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

Simple problem but looking for interesting solutions.

  • Best score: 10
  • Best player score: 21
  • Position: #236 / 239
  • Number of attempts: 1
fib.c cleanup - 65 entries

cleanup the file

  • Best score: 15
  • Best player score: 16
  • Position: #7 / 53
  • Number of attempts: 1
Groups magic - 144 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: #82 / 86
  • Number of attempts: 1
Sort by your own sum - 62 entries

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

  • Best score: 25
  • Best player score: 37
  • Position: #18 / 26
  • Number of attempts: 3
abcd > a b c d - 274 entries

transform the single spaces into 4 spaces repeat for each line

  • Best score: 15
  • Best player score: 15
  • Position: #31 / 213
  • Number of attempts: 1
Readable Rubyhash - 242 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: #77 / 90
  • Number of attempts: 2
Checkerboard case pattern - 139 entries

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

  • Best score: 15
  • Best player score: 26
  • Position: #52 / 56
  • Number of attempts: 3
NATO phonetic alphabet - 491 entries

Transform the series of words into a list.

  • Best score: 19
  • Best player score: 21
  • Position: #77 / 186
  • Number of attempts: 1
Printable ASCII characters - 120 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: #33 / 40
  • Number of attempts: 1
A simple change - 429 entries

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

  • Best score: 12
  • Best player score: 15
  • Position: #133 / 184
  • Number of attempts: 2
Presidential Sorting - 47 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 / 22
  • Number of attempts: 2
Extract text from xml - 106 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 / 43
  • Number of attempts: 1
The Quick Brown Fox Jumps Over The Lazy Vim - 394 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: #43 / 184
  • Number of attempts: 2
The name of the game - 638 entries

End up with the name of the game.

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

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

  • Best score: 16
  • Best player score: 36
  • Position: #89 / 159
  • Number of attempts: 3
SFD-ROC: vimvimvim - 1534 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: #328 / 432
  • Number of attempts: 1
Stairs Indenting - 440 entries

Indent each line with <line number> whitespaces.

  • Best score: 12
  • Best player score: 27
  • Position: #182 / 189
  • Number of attempts: 2
SFD-ROC: ROT13 Phonics - 81 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 / 66
  • Number of attempts: 2
Let's play some Ivmgolf - 1050 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 9
  • Position: #156 / 429
  • Number of attempts: 4
Vertical Limit - 2389 entries

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

  • Best score: 21
  • Best player score: 28
  • Position: #543 / 724
  • Number of attempts: 1
switch variable - 4996 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 14
  • Position: #1292 / 1723
  • Number of attempts: 3
Multiplication table. - 195 entries

Create a multiplication table.

  • Best score: 31
  • Best player score: 64
  • Position: #25 / 63
  • Number of attempts: 1
Assignment Alignment - 824 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 - 1804 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: #435 / 475
  • Number of attempts: 2
Sort and add attributes - 1245 entries

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

  • Best score: 33
  • Best player score: 38
  • Position: #426 / 503
  • Number of attempts: 2
Whitespace, empty lines and tabs - 3103 entries

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

  • Best score: 16
  • Best player score: 29
  • Position: #436 / 689
  • Number of attempts: 1
Flodder-challenge - 985 entries

Replace the text the most efficient and win!

  • Best score: 27
  • Best player score: 35
  • Position: #129 / 287
  • Number of attempts: 2
Simple text editing with Vim - 11865 entries

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

  • Best score: 13
  • Best player score: 18
  • Position: #2424 / 3472
  • Number of attempts: 3
Reformat/Refactor a Golfer Class - 6225 entries

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

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

entered into 29 challenges

contributed 0 challenges