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 assigned value - 626 entries

Simple problem but looking for interesting solutions.

  • Best score: 10
  • Best player score: 21
  • Position: #246 / 250
  • Number of attempts: 1
fib.c cleanup - 66 entries

cleanup the file

  • Best score: 15
  • Best player score: 16
  • Position: #7 / 54
  • Number of attempts: 1
Groups magic - 153 entries

Regexp or macros for string converting: (a) -> ___ (abc) -> ____ (abcd) -> ______ All in the '(' replace to _ multiply by char count + ()

  • Best score: 13
  • Best player score: 17
  • Position: #86 / 91
  • Number of attempts: 1
Sort by your own sum - 71 entries

Same numbers as last time, but you'll have to add them yourself.

  • Best score: 25
  • Best player score: 37
  • Position: #19 / 28
  • Number of attempts: 3
abcd > a b c d - 280 entries

transform the single spaces into 4 spaces repeat for each line

  • Best score: 15
  • Best player score: 15
  • Position: #31 / 218
  • Number of attempts: 1
Readable Rubyhash - 244 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: 37
  • Position: #79 / 92
  • Number of attempts: 2
Checkerboard case pattern - 148 entries

All the squares are white. Make some of them black. But only the right ones.

  • Best score: 15
  • Best player score: 26
  • Position: #54 / 58
  • Number of attempts: 3
NATO phonetic alphabet - 501 entries

Transform the series of words into a list.

  • Best score: 19
  • Best player score: 21
  • Position: #77 / 191
  • Number of attempts: 1
Printable ASCII characters - 124 entries

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

  • Best score: 22
  • Best player score: 47
  • Position: #35 / 42
  • Number of attempts: 1
A simple change - 442 entries

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

  • Best score: 12
  • Best player score: 15
  • Position: #135 / 189
  • Number of attempts: 2
Presidential Sorting - 48 entries

Given a nice CSV formatted arrangement of the Presidents of the United States, we need to print out an alphabetical list in pretty columns. Prove that vim can conquer this basic Excel task!

  • Best score: 40
  • Best player score: 56
  • Position: #20 / 23
  • Number of attempts: 2
Extract text from xml - 109 entries

Extract text from xml file (ignoring commented out elements) and create a one line regex.

  • Best score: 28
  • Best player score: 45
  • Position: #31 / 44
  • Number of attempts: 1
The Quick Brown Fox Jumps Over The Lazy Vim - 401 entries

Someone has vandalized this text file and replaced the beginning character of one word in each line with a Big "X." Please remove the big X's, and fix each line to read "The Quick Brown Fox Jumps Over The Lazy Dog."

  • Best score: 8
  • Best player score: 10
  • Position: #44 / 188
  • Number of attempts: 2
The name of the game - 650 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Position: #77 / 356
  • Number of attempts: 4
lamb had a little Mary - 586 entries

"Mary" and "lamb" are swapped. Unswap them. Fast as you can.

  • Best score: 16
  • Best player score: 36
  • Position: #90 / 163
  • Number of attempts: 3
SFD-ROC: vimvimvim - 1581 entries

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

  • Best score: 8
  • Best player score: 14
  • Position: #333 / 439
  • Number of attempts: 1
Stairs Indenting - 448 entries

Indent each line with <line number> whitespaces.

  • Best score: 12
  • Best player score: 27
  • Position: #185 / 193
  • Number of attempts: 2
SFD-ROC: ROT13 Phonics - 99 entries

A is for apple, b is for ball, etc... This familiar phonics poem has been rotated 13 characters. Make the letter match the word.

  • Best score: 6
  • Best player score: 6
  • Position: #33 / 72
  • Number of attempts: 2
Let's play some Ivmgolf - 1091 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 9
  • Position: #161 / 441
  • Number of attempts: 4
Vertical Limit - 2448 entries

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

  • Best score: 21
  • Best player score: 28
  • Position: #555 / 738
  • Number of attempts: 1
switch variable - 5036 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 14
  • Position: #1299 / 1736
  • Number of attempts: 3
Multiplication table. - 205 entries

Create a multiplication table.

  • Best score: 31
  • Best player score: 64
  • Position: #25 / 63
  • Number of attempts: 1
Assignment Alignment - 832 entries

line up the operators. Use spaces, not tabs.

  • Best score: 18
  • Best player score: 41
  • Position: #199 / 215
  • Number of attempts: 1
Shebangs for all - 1912 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: 24
  • Position: #455 / 500
  • Number of attempts: 2
Sort and add attributes - 1327 entries

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

  • Best score: 33
  • Best player score: 38
  • Position: #448 / 529
  • Number of attempts: 2
Whitespace, empty lines and tabs - 3340 entries

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

  • Best score: 16
  • Best player score: 29
  • Position: #468 / 737
  • Number of attempts: 1
Flodder-challenge - 1118 entries

Replace the text the most efficient and win!

  • Best score: 27
  • Best player score: 35
  • Position: #140 / 311
  • Number of attempts: 2
Simple text editing with Vim - 12290 entries

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

  • Best score: 13
  • Best player score: 18
  • Position: #2487 / 3581
  • Number of attempts: 3
Reformat/Refactor a Golfer Class - 6560 entries

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

  • Best score: 32
  • Best player score: 41
  • Position: #845 / 1616
  • Number of attempts: 1
Eric Andres
Twitter:

entered into 29 challenges

contributed 0 challenges