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

Refactoring useless Method away - 78 entries

Real-life challenge, convert a bunch of ifs to a switch statement

  • Best score: 47
  • Best player score: 67
  • Number of attempts: 2
Saving the hashes(#) - 1826 entries

The following file is copied from vimcasts.org(Its only for learning purpose,hope the site owner doesn't mind it), its probably the easiest of challenges.Our goal is to delete every line which doesn't contain a hash signs. The remaining hash signs with numbers are then sorted to get the final output.

  • Best score: 20
  • Best player score: 27
  • Number of attempts: 5
replacing each line of a block selection - 2620 entries

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

  • Best score: 18
  • Best player score: 21
  • Number of attempts: 1
Reconstruct the Sentence - 1034 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
  • Number of attempts: 1
Reverse Simple Deletion - 730 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 3
Increment, increment, increment.... - 498 entries

Vim likes macros

  • Best score: 10
  • Best player score: 12
  • Number of attempts: 1
Just the middle - 9941 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Number of attempts: 5
The name of the game - 592 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 1
NATO phonetic alphabet - 408 entries

Transform the series of words into a list.

  • Best score: 19
  • Best player score: 19
  • Number of attempts: 10
Delete unwanted lines - 341 entries

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

  • Best score: 9
  • Best player score: 9
  • Number of attempts: 2
Let's play some Ivmgolf - 966 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 9
  • Number of attempts: 4
V to the i - 4215 entries

Input is 99 V's. Output is 100 i's.

  • Best score: 7
  • Best player score: 8
  • Number of attempts: 3
Word frequency alignment - 204 entries

You've got to align the second column, but the spacing is inconvenient and there are nasty tabs in the way. If you're a "real Vim ninja," this could be very quick indeed...

  • Best score: 5
  • Best player score: 6
  • Number of attempts: 1
Condensed Cases - 718 entries

Apple's new programming language, Swift, allows two style of case statements: 1) one Enum case on each line, or 2) multiple Enum cases on a single line. Convert the following from the first case (no pun intended) to the second type.

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 7
Lisp Condense - 396 entries

Reduce 4 cons selection operations down to one function call.

  • Best score: 13
  • Best player score: 13
  • Number of attempts: 6
you're stuck on jQuery < 1.7 - 324 entries

replace calls to jQuery 1.7+'s `on` with calls to pre 1.7 `bind`

  • Best score: 25
  • Best player score: 32
  • Number of attempts: 3
Remove noise from HTTP log - 622 entries

This piece of log (from the year 2000) contains some irrelevant data. We only want to see the HTTP method and resource.

  • Best score: 15
  • Best player score: 17
  • Number of attempts: 1
SFD-ROC: vimvimvim - 1332 entries

Oh no, this line is longer than 80 chars... put each 'vim' on a new line.

  • Best score: 8
  • Best player score: 9
  • Number of attempts: 4
Prefixes and suffixes - 517 entries

Generate all prefixes of "vimchallenge", then all suffixes.

  • Best score: 17
  • Best player score: 38
  • Number of attempts: 1
Append semicolon after expressions - 890 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 13
  • Number of attempts: 2
abcd > a b c d - 244 entries

transform the single spaces into 4 spaces repeat for each line

  • Best score: 15
  • Best player score: 15
  • Number of attempts: 1
Make it more readable - 1785 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 16
  • Number of attempts: 2
Simple text editing with Vim - 10810 entries

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

  • Best score: 13
  • Best player score: 17
  • Number of attempts: 2
Extract argument from function - 2090 entries

The aim is to see if you can do some refactoring very fast.

  • Best score: 13
  • Best player score: 17
  • Number of attempts: 2
A HAPPY NEW YEAR 2014 ! - 9880 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 7
Search and Replace 0 - 4345 entries

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

  • Best score: 12
  • Best player score: 18
  • Number of attempts: 2
Reverse and double space - 418 entries

Reverse the order of the given lines and double space everything

  • Best score: 14
  • Best player score: 19
  • Number of attempts: 1
Numbering a List - 1756 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 20
  • Number of attempts: 2
Karun Ramakrishnan
Twitter:

Developer, Designer, Tester, Writer

entered into 28 challenges

contributed 0 challenges