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

Space out the alphabet - 1657 entries

Put 3 spaces between adjacent letters.

  • Best score: 15
  • Best player score: 23
  • Position: #343 / 444
  • Number of attempts: 4
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: #9 / 107
  • Number of attempts: 5
abcd > a b c d - 290 entries

transform the single spaces into 4 spaces repeat for each line

  • Best score: 15
  • Best player score: 15
  • Position: #11 / 221
  • Number of attempts: 1
Python: Lots of function arguments - 119 entries

The function definition is too long for one line. The modeline helps you with some typical Python indent settings.

  • Best score: 6
  • Best player score: 13
  • Position: #7 / 50
  • Number of attempts: 3
Readable Rubyhash - 267 entries

Rubyists talk about being cutting edge but how many are using 1.9 in production? Time to convert those verbose 1.8 hashes in to symbolic, succinct 1.9 beauties!

  • Best score: 23
  • Best player score: 27
  • Position: #33 / 95
  • Number of attempts: 4
NATO phonetic alphabet - 526 entries

Transform the series of words into a list.

  • Best score: 19
  • Best player score: 34
  • Position: #189 / 195
  • Number of attempts: 1
A simple change - 461 entries

Just change the numbers in the most efficient way ...

  • Best score: 12
  • Best player score: 12
  • Position: #7 / 191
  • Number of attempts: 5
The name of the game - 665 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Position: #76 / 360
  • Number of attempts: 3
SFD-ROC: vimvimvim - 1606 entries

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

  • Best score: 8
  • Best player score: 8
  • Position: #14 / 446
  • Number of attempts: 4
Chucking wood - 125 entries

An exercise in compressing repetitive text. For this challenge, any entry that uses keys outside the main row (such as arrow keys, Home, End, Delete, etc.) will be removed. (Esc is OK, though you should be using C-[ anyway.)

  • Best score: 51
  • Best player score: 60
  • Position: #36 / 48
  • Number of attempts: 2
Stairs Indenting - 473 entries

Indent each line with <line number> whitespaces.

  • Best score: 12
  • Best player score: 13
  • Position: #34 / 197
  • Number of attempts: 4
Let's play some Ivmgolf - 1118 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 7
  • Position: #15 / 445
  • Number of attempts: 4
Vertical Limit - 2538 entries

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

  • Best score: 21
  • Best player score: 26
  • Position: #422 / 754
  • Number of attempts: 1
Switch function arguments - 2125 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 13
  • Position: #349 / 659
  • Number of attempts: 4
Remove semicolons after expressions - 654 entries

A follow-up for http://vimgolf.com/challenges/4fc9d767d3a0d4000100000e.

  • Best score: 6
  • Best player score: 6
  • Position: #32 / 263
  • Number of attempts: 4
Make it more readable - 1988 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 17
  • Position: #444 / 647
  • Number of attempts: 1
Whitespace, empty lines and tabs - 3591 entries

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

  • Best score: 16
  • Best player score: 31
  • Position: #541 / 776
  • Number of attempts: 1
Jordan Eldredge
Twitter:

I write code and sing opera. I run http://t.co/Ns4ieLbwKJ and built http://t.co/jLpMkj6x7y

entered into 17 challenges

contributed 0 challenges