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

Remove line numbers - 528 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: #41 / 140
  • Number of attempts: 1
Paste a column after a column - 2229 entries

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

  • Best score: 14
  • Best player score: 20
  • Position: #263 / 481
  • Number of attempts: 1
Fizzbuzz - 502 entries

type the first 100 lines of the fizzbuzz problem

  • Best score: 47
  • Best player score: 51
  • Position: #26 / 155
  • Number of attempts: 1
Wrap the text of an email message to 79 characters - 679 entries

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

  • Best score: 5
  • Best player score: 6
  • Position: #339 / 386
  • Number of attempts: 1
Fun With The Diagonal - 103 entries

change the lowercase characters on the main diagonal to uppercase

  • Best score: 11
  • Best player score: 11
  • Position: #76 / 79
  • Number of attempts: 1
Sort the VimGolf challenges by popularity - 345 entries

"Sort by popularity" is a good order to play the challenges. Not perfect, but you could do a lot worse. ;) Input is a sample copy-pasted from vimgolf.com. Some of the challenge names have digits that will get in your way, so read ":help :sort" for hints on sorting with a regex. When you're done, try your solution on the full list!

  • Best score: 15
  • Best player score: 15
  • Position: #37 / 105
  • Number of attempts: 1
Reformat most common surnames - 647 entries

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

  • Best score: 23
  • Best player score: 26
  • Position: #74 / 198
  • Number of attempts: 2
Remember FizzBuzz? - 654 entries

Output FizzBuzz to 100. Start with nothing.

  • Best score: 39
  • Best player score: 61
  • Position: #111 / 177
  • Number of attempts: 1
Get rid of html tags - 368 entries

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

  • Best score: 15
  • Best player score: 17
  • Position: #120 / 217
  • Number of attempts: 2
Change the content of a string - 1474 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 25
  • Position: #358 / 557
  • Number of attempts: 1
Deleting folded text - 341 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: 20
  • Position: #59 / 113
  • Number of attempts: 2
Sort and add attributes - 1327 entries

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

  • Best score: 33
  • Best player score: 34
  • Position: #360 / 529
  • Number of attempts: 3
Add fold markers to a .c file - 556 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: #86 / 172
  • Number of attempts: 1
Reconstruct the Sentence - 1363 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: 21
  • Position: #233 / 383
  • Number of attempts: 2
Braces or Brackets? - 882 entries

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

  • Best score: 34
  • Best player score: 49
  • Position: #208 / 287
  • Number of attempts: 1
Whitespace, empty lines and tabs - 3330 entries

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

  • Best score: 16
  • Best player score: 21
  • Position: #219 / 735
  • Number of attempts: 1
Flodder-challenge - 1117 entries

Replace the text the most efficient and win!

  • Best score: 27
  • Best player score: 34
  • Position: #123 / 311
  • Number of attempts: 1
Simple text editing with Vim - 12276 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #1939 / 3578
  • Number of attempts: 3
Reformat/Refactor a Golfer Class - 6545 entries

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

  • Best score: 32
  • Best player score: 33
  • Position: #267 / 1610
  • Number of attempts: 4
Michael
Github:

entered into 19 challenges

contributed 0 challenges