Real Vim ninjas count every keystroke - do you?

Pick a challenge, fire up Vim, and show us what you got.

Changelog, Rules & FAQ, updates: @vimgolf, RSS.

Your VimGolf key: please sign in

$ gem install vimgolf
$ vimgolf setup
$ vimgolf put [challenge ID]

Played Challenges

months to html list items - 1088 entries

Turn the months into list items.

  • Best score: 22
  • Best player score: 31
  • Position: #226 / 295
  • Number of attempts: 1
Quicksort - 2035 entries

We need the numbers in the first row sorted as quickly as possible! Be careful not to disturb the data below the divider though: that must remain unchanged.

  • Best score: 6
  • Best player score: 6
  • Position: #102 / 450
  • Number of attempts: 1
EDN reformat - 1175 entries

The goal is to make the code more readable and concise while maintaining its functionality.

  • Best score: 17
  • Best player score: 18
  • Position: #70 / 167
  • Number of attempts: 19
Remove line numbers - 745 entries

From http://web.archive.org/web/20140831121704/http://dirac.org/linux/gdb/02a-Memory_Layout_And_The_Stack.php#investigatingthestackwithgdb.

  • Best score: 9
  • Best player score: 13
  • Position: #103 / 199
  • Number of attempts: 2
Surround the 'z' character with brackets, quotes, and print as formatted string. - 567 entries

Surround the 'z' character with brackets, quotes, and print as formatted string.

  • Best score: 17
  • Best player score: 17
  • Position: #200 / 318
  • Number of attempts: 2
Paste a column after a column - 2604 entries

This task is very common while using multi-cursor. What is the elegant vim way ?

  • Best score: 14
  • Best player score: 22
  • Position: #355 / 565
  • Number of attempts: 3
Many duplicates - 1459 entries

Quick and easy

  • Best score: 7
  • Best player score: 12
  • Position: #427 / 476
  • Number of attempts: 1
Fix the shell script! - 2605 entries

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 57
  • Position: #533 / 606
  • Number of attempts: 1
hello-world-vimgolf - 2505 entries

Simple number generation

  • Best score: 10
  • Best player score: 10
  • Position: #320 / 712
  • Number of attempts: 5
Learn to ask for :help - 587 entries

Learn to use the help to reduce your strokes...

  • Best score: 19
  • Best player score: 43
  • Position: #107 / 130
  • Number of attempts: 1
simple replacements - 1814 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 25
  • Position: #267 / 392
  • Number of attempts: 5
Add quotes to ansible playbook - 1008 entries

You created an ansible playbook, but forgot to add quotes. Can you fix it?

  • Best score: 8
  • Best player score: 9
  • Position: #214 / 317
  • Number of attempts: 4
Multiline to Single Line - 736 entries

Convert a multiline, indented file to a single line with no whitespace

  • Best score: 5
  • Best player score: 5
  • Position: #248 / 312
  • Number of attempts: 7
From a Thunderlink to a Markdown link - 779 entries

ThunderLinks are durable hyperlinks to specific email messages generated from Thunderbird in HTML format. Leverage the power of vim to make them suitable for a markdown-formatted file.

  • Best score: 18
  • Best player score: 20
  • Position: #81 / 173
  • Number of attempts: 9
Yo To Hello - 1151 entries

Simply Turn Yo To Hello

  • Best score: 8
  • Best player score: 12
  • Position: #497 / 533
  • Number of attempts: 1
Add to end of each line... kinda - 338 entries

Visual-block mode can be used to add something to the end of each line, even if they are of differing lengths. However, what if it's not quite at the end?

  • Best score: 12
  • Best player score: 12
  • Position: #110 / 175
  • Number of attempts: 2
Vice versa - 7968 entries

Little role switching.

  • Best score: 12
  • Best player score: 15
  • Position: #1125 / 2144
  • Number of attempts: 6
Sorting a glossary - 132 entries

Sort a glossary. Glossary head contains a header phrase ending with ':' and glossary body has multi line text indented with a tab.

  • Best score: 6
  • Best player score: 7
  • Position: #79 / 82
  • Number of attempts: 3
Angular naming conventions - 326 entries

In angular, a directive name follows the camelCase convention. When the directive is used in an HTML template, the words are instead separated by a dash. Go from to the other the fastest!

  • Best score: 18
  • Best player score: 23
  • Position: #98 / 119
  • Number of attempts: 6
Swap assigned value - 664 entries

Simple problem but looking for interesting solutions.

  • Best score: 10
  • Best player score: 10
  • Position: #110 / 258
  • Number of attempts: 7
VimGolfNight - 575 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Position: #292 / 352
  • Number of attempts: 5
Happy TvvO - 427 entries

Don’t forget the past, learn from it. Happy New Year.

  • Best score: 12
  • Best player score: 12
  • Position: #154 / 206
  • Number of attempts: 4
learn vim in short time - 240 entries

so happy to learn vim.because vim is awesome

  • Best score: 8
  • Best player score: 8
  • Position: #130 / 161
  • Number of attempts: 3
Gray area - 747 entries

It's a golf metaphor or something.

  • Best score: 11
  • Best player score: 12
  • Position: #132 / 271
  • Number of attempts: 8
A HAPPY NEW YEAR 2014 ! - 10699 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Position: #1606 / 3695
  • Number of attempts: 2
Ninjas Leaderboard - 102 entries

The two lines in "Start file" has an obfuscated email address. Second line give an index (from 1 to 30) to the chars list of the first line, for example, the first char of email (n) is in position 25, second char (i) is in position 19 and s.o.

  • Best score: 25
  • Best player score: 35
  • Position: #34 / 42
  • Number of attempts: 1
Groups magic - 162 entries

Regexp or macros for string converting: (a) -> ___ (abc) -> ____ (abcd) -> ______ All in the '(' replace to _ multiply by char count + ()

  • Best score: 13
  • Best player score: 19
  • Position: #93 / 95
  • Number of attempts: 3
Changing URL path in CSS - 139 entries

What's the quickest way to swap out all the URLs in a CSS file? Is it wasted keystrokes using look-behinds and look-aheads? (I'm sorry for the delete/report--I made a mistake with the last one requiring an ugly search for graphic to replace with images. I just intended this to be a simple search and replace that might possibly generate some macros or normals solutions that are quicker)

  • Best score: 40
  • Best player score: 69
  • Position: #59 / 63
  • Number of attempts: 5
NATO phonetic alphabet - 538 entries

Transform the series of words into a list.

  • Best score: 19
  • Best player score: 23
  • Position: #144 / 197
  • Number of attempts: 1
A simple change - 474 entries

Just change the numbers in the most efficient way ...

  • Best score: 12
  • Best player score: 14
  • Position: #133 / 195
  • Number of attempts: 2
The name of the game - 678 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Position: #280 / 363
  • Number of attempts: 2
Aligning function arguments to match a specific coding style - 259 entries

Most projects have specific coding style guidelines. In this case, the argument list must be broken into a new line for each argument, with the argument names right aligned, taking into account pointers.

  • Best score: 16
  • Best player score: 23
  • Position: #56 / 72
  • Number of attempts: 6
Shebangs for all - 2039 entries

We've all seen or used a shebang once or twice. Ditch the specific paths and leave just a dynamic Ruby and Python bath behind.

  • Best score: 11
  • Best player score: 28
  • Position: #507 / 521
  • Number of attempts: 1
A Simple One - 1064 entries

Here is a very simple one - just to illustrate/introduce a vim feature that some people seem to miss...

  • Best score: 9
  • Best player score: 9
  • Position: #568 / 670
  • Number of attempts: 3
82 bottles of beer on the wall - 313 entries

Take them down. (sorry, only 82 bottles because the problem size is limited!)

  • Best score: 106
  • Best player score: 334
  • Position: #142 / 146
  • Number of attempts: 1
Table Reshuffle - 450 entries

Fix the column order in this table... also append the new 'username' column.

  • Best score: 22
  • Best player score: 49
  • Position: #134 / 144
  • Number of attempts: 2
Increment, increment, increment.... - 701 entries

Vim likes macros

  • Best score: 10
  • Best player score: 10
  • Position: #65 / 413
  • Number of attempts: 7
Hatsuyume - 548 entries

http://en.wikipedia.org/wiki/Hatsuyume

  • Best score: 15
  • Best player score: 25
  • Position: #91 / 189
  • Number of attempts: 7
Context Insensitive completion 1 - 512 entries

Finish writing this simple Python HTTP server.

  • Best score: 18
  • Best player score: 36
  • Position: #230 / 248
  • Number of attempts: 3
Simple text editing with Vim - 13092 entries

Make the pairs of lines match up by making each second line same as first

  • Best score: 13
  • Best player score: 29
  • Position: #3429 / 3765
  • Number of attempts: 2
Kanmuruuruu
Github:

entered into 40 challenges

contributed 0 challenges