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 - 647 entries

Simple problem but looking for interesting solutions.

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

cleanup the file

  • Best score: 15
  • Best player score: 16
  • Position: #8 / 55
  • Number of attempts: 1
Groups magic - 158 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: #87 / 93
  • Number of attempts: 1
Sort by your own sum - 86 entries

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

  • Best score: 24
  • Best player score: 37
  • Position: #21 / 30
  • Number of attempts: 3
abcd > a b c d - 291 entries

transform the single spaces into 4 spaces repeat for each line

  • Best score: 15
  • Best player score: 15
  • Position: #31 / 222
  • Number of attempts: 1
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: 37
  • Position: #82 / 95
  • Number of attempts: 2
Checkerboard case pattern - 164 entries

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

  • Best score: 15
  • Best player score: 26
  • Position: #57 / 61
  • Number of attempts: 3
NATO phonetic alphabet - 529 entries

Transform the series of words into a list.

  • Best score: 19
  • Best player score: 21
  • Position: #79 / 196
  • Number of attempts: 1
Printable ASCII characters - 142 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: #37 / 44
  • Number of attempts: 1
A simple change - 461 entries

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

  • Best score: 12
  • Best player score: 15
  • Position: #137 / 191
  • Number of attempts: 2
Presidential Sorting - 51 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: #21 / 26
  • Number of attempts: 2
Extract text from xml - 127 entries

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

  • Best score: 28
  • Best player score: 45
  • Position: #33 / 46
  • Number of attempts: 1
The Quick Brown Fox Jumps Over The Lazy Vim - 420 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: #46 / 192
  • Number of attempts: 2
The name of the game - 665 entries

End up with the name of the game.

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

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

  • Best score: 16
  • Best player score: 36
  • Position: #92 / 168
  • 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: 14
  • Position: #338 / 446
  • Number of attempts: 1
Stairs Indenting - 473 entries

Indent each line with <line number> whitespaces.

  • Best score: 12
  • Best player score: 27
  • Position: #188 / 197
  • Number of attempts: 2
SFD-ROC: ROT13 Phonics - 101 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 / 73
  • Number of attempts: 2
Let's play some Ivmgolf - 1118 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 9
  • Position: #164 / 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: 28
  • Position: #567 / 754
  • Number of attempts: 1
switch variable - 5071 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 14
  • Position: #1306 / 1748
  • Number of attempts: 3
Multiplication table. - 232 entries

Create a multiplication table.

  • Best score: 31
  • Best player score: 64
  • Position: #27 / 68
  • Number of attempts: 1
Assignment Alignment - 883 entries

line up the operators. Use spaces, not tabs.

  • Best score: 18
  • Best player score: 41
  • Position: #204 / 220
  • Number of attempts: 1
Shebangs for all - 1999 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: #466 / 516
  • Number of attempts: 2
Sort and add attributes - 1451 entries

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

  • Best score: 33
  • Best player score: 38
  • Position: #479 / 563
  • Number of attempts: 2
Whitespace, empty lines and tabs - 3665 entries

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

  • Best score: 16
  • Best player score: 29
  • Position: #502 / 787
  • Number of attempts: 1
Flodder-challenge - 1262 entries

Replace the text the most efficient and win!

  • Best score: 27
  • Best player score: 35
  • Position: #151 / 335
  • Number of attempts: 2
Simple text editing with Vim - 12811 entries

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

  • Best score: 13
  • Best player score: 18
  • Position: #2571 / 3694
  • Number of attempts: 3
Reformat/Refactor a Golfer Class - 6982 entries

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

  • Best score: 28
  • Best player score: 41
  • Position: #878 / 1706
  • Number of attempts: 1
Eric Andres
Twitter:

entered into 29 challenges

contributed 0 challenges