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 - 1298 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: #17 / 205
  • Number of attempts: 10
Copy punctuation - 487 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 / 121
  • Number of attempts: 7
New teacher - 923 entries

Update the details of the new CS teacher.

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

Turn the months into list items.

  • Best score: 22
  • Best player score: 22
  • Position: #33 / 274
  • Number of attempts: 19
Quicksort - 1962 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 / 431
  • 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. - 554 entries

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

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

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

  • Best score: 14
  • Best player score: 17
  • Position: #226 / 553
  • 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 - 766 entries

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

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

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

  • Best score: 12
  • Best player score: 12
  • Position: #741 / 1624
  • 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 - 604 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 / 208
  • Number of attempts: 7
Reverse characters in a line - 771 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 / 265
  • Number of attempts: 6
PEP8 Python Wrapping Comments and Code - 210 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 / 67
  • Number of attempts: 17
Reformat most common surnames - 717 entries

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

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

Output FizzBuzz to 100. Start with nothing.

  • Best score: 39
  • Best player score: 39
  • Position: #18 / 190
  • Number of attempts: 19
Get rid of html tags - 398 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 / 230
  • Number of attempts: 3
Change the content of a string - 1580 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 22
  • Position: #226 / 588
  • Number of attempts: 3
Deleting folded text - 360 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: #21 / 117
  • Number of attempts: 6
Sort and add attributes - 1451 entries

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

  • Best score: 33
  • Best player score: 33
  • Position: #282 / 563
  • Number of attempts: 5
Add fold markers to a .c file - 625 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: #91 / 183
  • Number of attempts: 11
Reconstruct the Sentence - 1507 entries

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

  • Best score: 20
  • Best player score: 20
  • Position: #145 / 412
  • Number of attempts: 8
Braces or Brackets? - 1015 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 / 315
  • Number of attempts: 14
Whitespace, empty lines and tabs - 3665 entries

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

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

Replace the text the most efficient and win!

  • Best score: 27
  • Best player score: 33
  • Position: #115 / 335
  • Number of attempts: 9
Simple text editing with Vim - 12811 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #2000 / 3694
  • Number of attempts: 5
Reformat/Refactor a Golfer Class - 6982 entries

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

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

entered into 31 challenges

contributed 0 challenges