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

Swap function parameters and delete all comments in python. - 938 entries

Swap function parameters and delete all comments in python.

  • Best score: 19
  • Best player score: 20
  • Position: #63 / 229
  • Number of attempts: 8
Delete the last function argument in python. - 634 entries

Delete the last function argument in this python script.

  • Best score: 6
  • Best player score: 6
  • Position: #64 / 228
  • Number of attempts: 3
Sort and Tag - 737 entries

The goal is to sort these lines alphabetically, assign a unique identifier to each line in the format "[01]", "[02]", etc., and then restore the original order of the lines while preserving the assigned identifiers.

  • Best score: 36
  • Best player score: 116
  • Position: #108 / 156
  • Number of attempts: 2
Copy punctuation - 743 entries

I want to copy the last line’s brackets, quotes, and commas to each line. How?

  • Best score: 19
  • Best player score: 37
  • Position: #93 / 182
  • Number of attempts: 4
Search and Replace 0 - 5159 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #765 / 1674
  • Number of attempts: 3
Get rid of html tags - 463 entries

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

  • Best score: 12
  • Best player score: 17
  • Position: #157 / 261
  • Number of attempts: 2
Reconstruct the Sentence - 1754 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: 19
  • Position: #12 / 458
  • Number of attempts: 7
Braces or Brackets? - 1204 entries

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

  • Best score: 34
  • Best player score: 47
  • Position: #212 / 363
  • Number of attempts: 4
Whitespace, empty lines and tabs - 4047 entries

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

  • Best score: 16
  • Best player score: 22
  • Position: #368 / 863
  • Number of attempts: 9
Simple text editing with Vim - 13633 entries

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

  • Best score: 13
  • Best player score: 31
  • Position: #3603 / 3904
  • Number of attempts: 3
Reformat/Refactor a Golfer Class - 7688 entries

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

  • Best score: 7
  • Best player score: 40
  • Position: #910 / 1891
  • Number of attempts: 5
Jorrit Stramer
Github:

entered into 11 challenges

contributed 0 challenges