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

Prime Numbers - 391 entries

List the first 100 prime numbers.

  • Best score: 34
  • Best player score: 43
  • Position: #52 / 108
  • Number of attempts: 1
Python Hello World! Reformatting - 1022 entries

A novice Python using prints Hello World! and a pro shows him different way. Using vim to get into pro style from novice, win the challenge.

  • Best score: 39
  • Best player score: 49
  • Position: #347 / 391
  • Number of attempts: 1
VimGolfNight - 583 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Position: #1 / 354
  • Number of attempts: 1
quotes inside quotes - 3200 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: 14
  • Best player score: 16
  • Position: #534 / 1091
  • Number of attempts: 3
Words in parens - 13034 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #81 / 3988
  • Number of attempts: 4
Word frequency alignment - 307 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: 5
  • Position: #74 / 165
  • Number of attempts: 2
NATO phonetic alphabet - 547 entries

Transform the series of words into a list.

  • Best score: 19
  • Best player score: 19
  • Position: #15 / 199
  • Number of attempts: 5
Printable ASCII characters - 161 entries

From a blank input, print all 95 printing ASCII characters one per line, from space to tilde.

  • Best score: 22
  • Best player score: 32
  • Position: #17 / 45
  • Number of attempts: 3
The name of the game - 682 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Position: #67 / 366
  • Number of attempts: 2
Stairs Indenting - 483 entries

Indent each line with <line number> whitespaces.

  • Best score: 12
  • Best player score: 13
  • Position: #33 / 200
  • Number of attempts: 4
Let's play some Ivmgolf - 1153 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 7
  • Position: #9 / 457
  • Number of attempts: 6
Flip the chessboard - 115 entries

White's turn is over. Flip the board to black's perspective. I added coordinates to frustrate you.

  • Best score: 18
  • Best player score: 23
  • Position: #15 / 33
  • Number of attempts: 3
Switch function arguments - 2204 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 11
  • Position: #45 / 681
  • Number of attempts: 7
Append semicolon after expressions - 1071 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 11
  • Position: #31 / 425
  • Number of attempts: 3
Reverse and double space - 511 entries

Reverse the order of the given lines and double space everything

  • Best score: 14
  • Best player score: 14
  • Position: #39 / 202
  • Number of attempts: 3
Make it more readable - 2036 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 14
  • Position: #155 / 657
  • Number of attempts: 5
Alphabetize the directory - 327 entries

Put the contacts and their information in alphabetical order.

  • Best score: 30
  • Best player score: 34
  • Position: #54 / 103
  • Number of attempts: 8
Reformat long lines - 377 entries

Rearrange this ruby method call to put each parameter on its own line. Could become a useful macro.

  • Best score: 15
  • Best player score: 15
  • Position: #18 / 139
  • Number of attempts: 7
Numbering a List - 1944 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 18
  • Position: #132 / 659
  • Number of attempts: 5
CSV to JSON - 178 entries

A search for shortest vimissh way to convert CSV to JSON.

  • Best score: 56
  • Best player score: 76
  • Position: #15 / 67
  • Number of attempts: 3
Shebangs for all - 2098 entries

We've all seen or used a shebang once or twice. Ditch the specific paths and leave just a dynamic Ruby and Python bath behind.

  • Best score: 11
  • Best player score: 12
  • Position: #132 / 531
  • Number of attempts: 8
Reverse Simple Deletion - 870 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 11
  • Position: #12 / 465
  • Number of attempts: 2
Increment, increment, increment.... - 705 entries

Vim likes macros

  • Best score: 10
  • Best player score: 12
  • Position: #248 / 415
  • Number of attempts: 1
Hatsuyume - 564 entries

http://en.wikipedia.org/wiki/Hatsuyume

  • Best score: 15
  • Best player score: 37
  • Position: #176 / 193
  • Number of attempts: 1
Reformat some Python - 646 entries

Fix some very bizarrely laid-out code.

  • Best score: 34
  • Best player score: 46
  • Position: #155 / 244
  • Number of attempts: 1
Reverse characters in a line - 832 entries

You have everything you need, just not in the right order. Mastermind would give you 26 white pegs.

  • Best score: 8
  • Best player score: 13
  • Position: #60 / 278
  • Number of attempts: 1
Sort and add attributes - 1576 entries

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

  • Best score: 33
  • Best player score: 45
  • Position: #589 / 611
  • Number of attempts: 1
Whitespace, empty lines and tabs - 4025 entries

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

  • Best score: 16
  • Best player score: 36
  • Position: #738 / 857
  • Number of attempts: 2
Drew Neil
Twitter:

The voice of @vimcasts and collector of @collectivenouns. Author of http://t.co/GeJ24MsK

entered into 28 challenges

contributed 0 challenges