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

Rearrange array to single level - 1829 entries

The goal is to flatten the array into a single list and remove any empty elements.

  • Best score: 14
  • Best player score: 16
  • Position: #32 / 307
  • Number of attempts: 10
Copy punctuation - 739 entries

I want to copy the last line’s brackets, quotes, and commas to each line. How?

  • Best score: 19
  • Best player score: 19
  • Position: #4 / 181
  • Number of attempts: 7
New teacher - 1519 entries

Update the details of the new CS teacher.

  • Best score: 19
  • Best player score: 19
  • Position: #4 / 319
  • Number of attempts: 15
months to html list items - 1151 entries

Turn the months into list items.

  • Best score: 22
  • Best player score: 22
  • Position: #33 / 311
  • Number of attempts: 19
Quicksort - 2113 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: #117 / 472
  • Number of attempts: 10
EDN reformat - 1222 entries

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

  • Best score: 17
  • Best player score: 18
  • Position: #75 / 173
  • Number of attempts: 16
Remove line numbers - 786 entries

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

  • Best score: 8
  • Best player score: 12
  • Position: #67 / 209
  • Number of attempts: 6
Surround the 'z' character with brackets, quotes, and print as formatted string. - 582 entries

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

  • Best score: 17
  • Best player score: 17
  • Position: #211 / 328
  • Number of attempts: 1
Paste a column after a column - 2668 entries

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

  • Best score: 14
  • Best player score: 17
  • Position: #238 / 578
  • Number of attempts: 10
Contribute to keyboard mashing - 913 entries

Speak in tongues

  • Best score: 17
  • Best player score: 17
  • Position: #56 / 277
  • Number of attempts: 8
Learn to ask for :help - 596 entries

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

  • Best score: 19
  • Best player score: 25
  • Position: #50 / 132
  • Number of attempts: 15
Wrap the text of an email message to 79 characters - 868 entries

You're replying to an email with silly long lines. Clean them up.

  • Best score: 5
  • Best player score: 5
  • Position: #308 / 451
  • Number of attempts: 4
Search and Replace 0 - 5159 entries

Replace every instance of 'aaa' with 'xaaax'.

  • Best score: 12
  • Best player score: 12
  • Position: #741 / 1674
  • Number of attempts: 6
Another Mixed-Up Haiku - 280 entries

VimGolf ... a perfect evening?

  • Best score: 21
  • Best player score: 21
  • Position: #41 / 92
  • Number of attempts: 7
Compile C - 454 entries

You might have to get clever to do this one.

  • Best score: 19
  • Best player score: 19
  • Position: #27 / 146
  • Number of attempts: 14
Reformat a C golf submission - 678 entries

Take this C golf submission (for the "tiny but standards-compliant Hello World program" category, naturally), and turn it into formatted C code.

  • Best score: 22
  • Best player score: 28
  • Position: #75 / 220
  • Number of attempts: 7
Reverse characters in a line - 844 entries

You have everything you need, just not in the right order. Mastermind would give you 26 white pegs.

  • Best score: 8
  • Best player score: 13
  • Position: #99 / 282
  • Number of attempts: 6
PEP8 Python Wrapping Comments and Code - 241 entries

According to PEP8, long flowy text and code should have different max line lengths. Code: 79 characters max Long flowy text: 72 characters max

  • Best score: 21
  • Best player score: 23
  • Position: #9 / 74
  • Number of attempts: 17
Reformat most common surnames - 834 entries

Reformat copy-pasted table into a list of the most common surnames

  • Best score: 23
  • Best player score: 24
  • Position: #38 / 238
  • Number of attempts: 13
Remember FizzBuzz? - 818 entries

Output FizzBuzz to 100. Start with nothing.

  • Best score: 39
  • Best player score: 39
  • Position: #18 / 209
  • Number of attempts: 19
Get rid of html tags - 463 entries

Want to read more about Vim's background? Then get rid of those html tags...

  • Best score: 12
  • Best player score: 16
  • Position: #25 / 261
  • Number of attempts: 3
Change the content of a string - 1799 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 22
  • Position: #226 / 655
  • Number of attempts: 3
Deleting folded text - 428 entries

The text below contains three folds. Delete them (and the text inside them). For example: 123 456 /*{{{*/ 789 /*}}}*/ 012 Should become: 123 012 Also, add `aoeuaoeu` to make sure small solutions don't get flagged as cheating.

  • Best score: 17
  • Best player score: 18
  • Position: #26 / 130
  • Number of attempts: 6
Sort and add attributes - 1591 entries

Sort the states and add the attribute country to each record.

  • Best score: 33
  • Best player score: 33
  • Position: #282 / 615
  • Number of attempts: 5
Add fold markers to a .c file - 734 entries

Fold markers can make it easier to navigate source code. Add them to this .c file.

  • Best score: 27
  • Best player score: 34
  • Position: #96 / 202
  • Number of attempts: 11
Reconstruct the Sentence - 1745 entries

Get the sentence back in the proper order, remove duplicate lines, and then combine the separate lines into one.

  • Best score: 19
  • Best player score: 20
  • Position: #161 / 457
  • Number of attempts: 8
Braces or Brackets? - 1201 entries

Someone forgot whether to use braces or brackets and you have to clean up their code!

  • Best score: 34
  • Best player score: 34
  • Position: #38 / 362
  • Number of attempts: 14
Whitespace, empty lines and tabs - 4044 entries

Convert tabs to spaces, strip empty lines and trailing whitespace.

  • Best score: 16
  • Best player score: 16
  • Position: #40 / 862
  • Number of attempts: 10
Flodder-challenge - 1500 entries

Replace the text the most efficient and win!

  • Best score: 27
  • Best player score: 33
  • Position: #131 / 378
  • Number of attempts: 9
Simple text editing with Vim - 13626 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #2044 / 3902
  • Number of attempts: 5
Reformat/Refactor a Golfer Class - 7681 entries

A simple case of removing unneeded code and fixing broken indentation.

  • Best score: 7
  • Best player score: 39
  • Position: #827 / 1889
  • Number of attempts: 8
Tsimon Dorakh
Github:

entered into 31 challenges

contributed 0 challenges