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 - 1560 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: #24 / 256
  • Number of attempts: 10
Copy punctuation - 599 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 / 149
  • Number of attempts: 7
New teacher - 1376 entries

Update the details of the new CS teacher.

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

Turn the months into list items.

  • Best score: 22
  • Best player score: 22
  • Position: #33 / 295
  • Number of attempts: 19
Quicksort - 2038 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 / 452
  • Number of attempts: 10
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: #74 / 167
  • Number of attempts: 16
Remove line numbers - 747 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 / 200
  • Number of attempts: 6
Surround the 'z' character with brackets, quotes, and print as formatted string. - 570 entries

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

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

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

  • Best score: 14
  • Best player score: 17
  • Position: #231 / 566
  • Number of attempts: 10
Contribute to keyboard mashing - 898 entries

Speak in tongues

  • Best score: 17
  • Best player score: 17
  • Position: #56 / 272
  • 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 - 825 entries

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

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

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

  • Best score: 12
  • Best player score: 12
  • Position: #741 / 1631
  • 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 - 441 entries

You might have to get clever to do this one.

  • Best score: 19
  • Best player score: 19
  • Position: #27 / 143
  • Number of attempts: 14
Reformat a C golf submission - 614 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 / 210
  • Number of attempts: 7
Reverse characters in a line - 778 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 / 268
  • Number of attempts: 6
PEP8 Python Wrapping Comments and Code - 219 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 / 69
  • Number of attempts: 17
Reformat most common surnames - 757 entries

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

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

Output FizzBuzz to 100. Start with nothing.

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

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 22
  • Position: #226 / 615
  • 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 - 1512 entries

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

  • Best score: 33
  • Best player score: 33
  • Position: #282 / 585
  • Number of attempts: 5
Add fold markers to a .c file - 664 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 / 191
  • Number of attempts: 11
Reconstruct the Sentence - 1651 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: #154 / 435
  • Number of attempts: 8
Braces or Brackets? - 1074 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 / 332
  • Number of attempts: 14
Whitespace, empty lines and tabs - 3795 entries

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

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

Replace the text the most efficient and win!

  • Best score: 27
  • Best player score: 33
  • Position: #121 / 353
  • Number of attempts: 9
Simple text editing with Vim - 13143 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #2012 / 3777
  • Number of attempts: 5
Reformat/Refactor a Golfer Class - 7259 entries

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

  • Best score: 10
  • Best player score: 39
  • Position: #793 / 1791
  • Number of attempts: 8
Tsimon Dorakh
Github:

entered into 31 challenges

contributed 0 challenges