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 - 1064 entries

Turn the months into list items.

  • Best score: 22
  • Best player score: 31
  • Position: #221 / 289
  • Number of attempts: 1
Quicksort - 2005 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 / 442
  • Number of attempts: 1
EDN reformat - 1162 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 / 166
  • Number of attempts: 19
Remove line numbers - 736 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: #102 / 198
  • Number of attempts: 2
Surround the 'z' character with brackets, quotes, and print as formatted string. - 561 entries

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

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

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

  • Best score: 14
  • Best player score: 22
  • Position: #350 / 558
  • Number of attempts: 3
Many duplicates - 1451 entries

Quick and easy

  • Best score: 7
  • Best player score: 12
  • Position: #422 / 471
  • Number of attempts: 1
Fix the shell script! - 2596 entries

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 57
  • Position: #530 / 603
  • Number of attempts: 1
hello-world-vimgolf - 2501 entries

Simple number generation

  • Best score: 10
  • Best player score: 10
  • Position: #320 / 709
  • 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 - 1802 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 25
  • Position: #266 / 390
  • Number of attempts: 5
Add quotes to ansible playbook - 1007 entries

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

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

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

  • Best score: 5
  • Best player score: 5
  • Position: #248 / 311
  • Number of attempts: 7
From a Thunderlink to a Markdown link - 776 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 / 172
  • Number of attempts: 9
Yo To Hello - 1144 entries

Simply Turn Yo To Hello

  • Best score: 8
  • Best player score: 12
  • Position: #494 / 530
  • Number of attempts: 1
Add to end of each line... kinda - 333 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 / 174
  • Number of attempts: 2
Vice versa - 7953 entries

Little role switching.

  • Best score: 12
  • Best player score: 15
  • Position: #1124 / 2140
  • Number of attempts: 6
Sorting a glossary - 131 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: #78 / 81
  • Number of attempts: 3
Angular naming conventions - 320 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: #97 / 118
  • Number of attempts: 6
Swap assigned value - 655 entries

Simple problem but looking for interesting solutions.

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

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Position: #292 / 350
  • 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 ! - 10688 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Position: #1606 / 3691
  • Number of attempts: 2
Ninjas Leaderboard - 99 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 / 41
  • Number of attempts: 1
Groups magic - 161 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: #92 / 94
  • Number of attempts: 3
Changing URL path in CSS - 138 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 / 62
  • Number of attempts: 5
NATO phonetic alphabet - 529 entries

Transform the series of words into a list.

  • Best score: 19
  • Best player score: 23
  • Position: #143 / 196
  • Number of attempts: 1
A simple change - 468 entries

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

  • Best score: 12
  • Best player score: 14
  • Position: #132 / 193
  • Number of attempts: 2
The name of the game - 671 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Position: #280 / 362
  • 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 - 2018 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: #505 / 519
  • Number of attempts: 1
A Simple One - 1057 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 / 667
  • 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 - 439 entries

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

  • Best score: 22
  • Best player score: 49
  • Position: #132 / 142
  • Number of attempts: 2
Increment, increment, increment.... - 696 entries

Vim likes macros

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

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

  • Best score: 15
  • Best player score: 25
  • Position: #90 / 187
  • Number of attempts: 7
Context Insensitive completion 1 - 506 entries

Finish writing this simple Python HTTP server.

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

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

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

entered into 40 challenges

contributed 0 challenges