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 - 1396 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: #19 / 229
  • Number of attempts: 10
Copy punctuation - 519 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 / 132
  • Number of attempts: 7
New teacher - 1090 entries

Update the details of the new CS teacher.

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

Turn the months into list items.

  • Best score: 22
  • Best player score: 22
  • Position: #33 / 284
  • Number of attempts: 19
Quicksort - 2002 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 / 440
  • Number of attempts: 10
EDN reformat - 1158 entries

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

  • Best score: 17
  • Best player score: 18
  • Position: #74 / 164
  • Number of attempts: 16
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: 12
  • Position: #66 / 198
  • Number of attempts: 6
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: #211 / 314
  • Number of attempts: 1
Paste a column after a column - 2555 entries

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

  • Best score: 14
  • Best player score: 17
  • Position: #227 / 557
  • Number of attempts: 10
Contribute to keyboard mashing - 890 entries

Speak in tongues

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

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

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

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

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

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

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

VimGolf ... a perfect evening?

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

You might have to get clever to do this one.

  • Best score: 19
  • Best player score: 19
  • Position: #27 / 141
  • Number of attempts: 14
Reformat a C golf submission - 612 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: #71 / 209
  • Number of attempts: 7
Reverse characters in a line - 776 entries

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

  • Best score: 12
  • Best player score: 13
  • Position: #93 / 267
  • Number of attempts: 6
PEP8 Python Wrapping Comments and Code - 217 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: #7 / 68
  • Number of attempts: 17
Reformat most common surnames - 743 entries

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

  • Best score: 23
  • Best player score: 24
  • Position: #37 / 215
  • Number of attempts: 13
Remember FizzBuzz? - 738 entries

Output FizzBuzz to 100. Start with nothing.

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

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

  • Best score: 12
  • Best player score: 16
  • Position: #22 / 236
  • Number of attempts: 3
Change the content of a string - 1593 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 22
  • Position: #226 / 594
  • Number of attempts: 3
Deleting folded text - 386 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: #23 / 121
  • Number of attempts: 6
Sort and add attributes - 1477 entries

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

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

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

  • Best score: 30
  • Best player score: 34
  • Position: #92 / 189
  • Number of attempts: 11
Reconstruct the Sentence - 1589 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: #150 / 425
  • Number of attempts: 8
Braces or Brackets? - 1054 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 / 324
  • Number of attempts: 14
Whitespace, empty lines and tabs - 3742 entries

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

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

Replace the text the most efficient and win!

  • Best score: 27
  • Best player score: 33
  • Position: #118 / 346
  • Number of attempts: 9
Simple text editing with Vim - 12989 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #2005 / 3737
  • Number of attempts: 5
Reformat/Refactor a Golfer Class - 7154 entries

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

  • Best score: 28
  • Best player score: 39
  • Position: #785 / 1754
  • Number of attempts: 8
Tsimon Dorakh
Github:

entered into 31 challenges

contributed 0 challenges