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

Search and Replace 0 - 4580 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #236 / 1516
  • Number of attempts: 5
quotes inside quotes - 2996 entries

taken from tip 85 of the very good book 'Practical Vim: Edit Text at the Speed of Thought' ! I'd be interested what people use :)

  • Best score: 3
  • Best player score: 14
  • Position: #23 / 1037
  • Number of attempts: 4
Top X - 185 entries

The End File is the Top 10 Vimgolf Leaderboard at June 29, 2013. This is a second version, with a great contribution of @udioica. X is ten in Roman,a numeric system in ancient Rome

  • Best score: 18
  • Best player score: 21
  • Position: #12 / 67
  • Number of attempts: 4
Sort the VimGolf challenges by popularity - 324 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: 20
  • Position: #82 / 98
  • Number of attempts: 2
Words in parens - 12682 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #49 / 3905
  • Number of attempts: 3
Delete unwanted lines - 350 entries

Delete all lines which does not end in "o.."

  • Best score: 9
  • Best player score: 9
  • Position: #56 / 210
  • Number of attempts: 1
The name of the game - 608 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Position: #123 / 331
  • Number of attempts: 3
Vertical Limit - 2310 entries

transform a succession of one word lines to a an array of strings

  • Best score: 21
  • Best player score: 21
  • Position: #10 / 702
  • Number of attempts: 12
replacing each line of a block selection - 2744 entries

replace each line's ../assets/js with /javascripts

  • Best score: 18
  • Best player score: 18
  • Position: #44 / 725
  • Number of attempts: 10
Switch function arguments - 1945 entries

How to switch two arguments of a function.

  • Best score: 3
  • Best player score: 11
  • Position: #65 / 618
  • Number of attempts: 5
Append semicolon after expressions - 923 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 11
  • Position: #46 / 375
  • Number of attempts: 3
switch variable - 4865 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 12
  • Position: #727 / 1689
  • Number of attempts: 2
Numbering a List - 1782 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 18
  • Position: #95 / 612
  • Number of attempts: 6
Whitespace, empty lines and tabs - 2788 entries

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

  • Best score: 16
  • Best player score: 17
  • Position: #66 / 636
  • Number of attempts: 7
Simple text editing with Vim - 11391 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #172 / 3347
  • Number of attempts: 4
Reformat/Refactor a Golfer Class - 5835 entries

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

  • Best score: 32
  • Best player score: 32
  • Position: #65 / 1442
  • Number of attempts: 10
Chris Webb
Twitter:

entered into 16 challenges

contributed 0 challenges