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 - 671 entries

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

  • Best score: 10
  • Best player score: 12
  • Position: #41 / 182
  • Number of attempts: 1
Paste a column after a column - 2477 entries

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

  • Best score: 14
  • Best player score: 20
  • Position: #295 / 535
  • Number of attempts: 1
Fizzbuzz - 556 entries

type the first 100 lines of the fizzbuzz problem

  • Best score: 45
  • Best player score: 51
  • Position: #27 / 165
  • Number of attempts: 1
Wrap the text of an email message to 79 characters - 750 entries

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

  • Best score: 5
  • Best player score: 6
  • Position: #356 / 405
  • Number of attempts: 1
Fun With The Diagonal - 107 entries

change the lowercase characters on the main diagonal to uppercase

  • Best score: 11
  • Best player score: 11
  • Position: #76 / 81
  • Number of attempts: 1
Sort the VimGolf challenges by popularity - 348 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 / 107
  • Number of attempts: 1
Reformat most common surnames - 691 entries

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

  • Best score: 23
  • Best player score: 26
  • Position: #79 / 205
  • Number of attempts: 2
Remember FizzBuzz? - 712 entries

Output FizzBuzz to 100. Start with nothing.

  • Best score: 39
  • Best player score: 61
  • Position: #118 / 187
  • Number of attempts: 1
Get rid of html tags - 383 entries

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

  • Best score: 15
  • Best player score: 17
  • Position: #124 / 224
  • Number of attempts: 2
Change the content of a string - 1536 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 25
  • Position: #370 / 576
  • Number of attempts: 1
Deleting folded text - 348 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: #61 / 115
  • Number of attempts: 2
Sort and add attributes - 1418 entries

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

  • Best score: 33
  • Best player score: 34
  • Position: #375 / 551
  • Number of attempts: 3
Add fold markers to a .c file - 602 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 / 178
  • Number of attempts: 1
Reconstruct the Sentence - 1467 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: #242 / 403
  • Number of attempts: 2
Braces or Brackets? - 957 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: #217 / 306
  • Number of attempts: 1
Whitespace, empty lines and tabs - 3559 entries

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

  • Best score: 16
  • Best player score: 21
  • Position: #235 / 768
  • Number of attempts: 1
Flodder-challenge - 1219 entries

Replace the text the most efficient and win!

  • Best score: 27
  • Best player score: 34
  • Position: #130 / 327
  • Number of attempts: 1
Simple text editing with Vim - 12616 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #1959 / 3650
  • Number of attempts: 3
Reformat/Refactor a Golfer Class - 6821 entries

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

  • Best score: 28
  • Best player score: 33
  • Position: #269 / 1671
  • Number of attempts: 4
Michael
Github:

entered into 19 challenges

contributed 0 challenges