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

Presidential Sorting - 45 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
  • Number of attempts: 2
Printable ASCII characters - 95 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
  • Number of attempts: 1
Extract text from xml - 101 entries

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

  • Best score: 28
  • Best player score: 45
  • Number of attempts: 1
Sort and add attributes - 1101 entries

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

  • Best score: 33
  • Best player score: 38
  • Number of attempts: 2
Groups magic - 136 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
  • Number of attempts: 1
Reformat/Refactor a Golfer Class - 5570 entries

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

  • Best score: 32
  • Best player score: 41
  • Number of attempts: 1
abcd > a b c d - 241 entries

transform the single spaces into 4 spaces repeat for each line

  • Best score: 15
  • Best player score: 15
  • Number of attempts: 1
Sort by your own sum - 42 entries

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

  • Best score: 25
  • Best player score: 37
  • Number of attempts: 3
SFD-ROC: vimvimvim - 1325 entries

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

  • Best score: 8
  • Best player score: 14
  • Number of attempts: 1
A simple change - 362 entries

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

  • Best score: 12
  • Best player score: 15
  • Number of attempts: 2
switch variable - 4451 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 14
  • Number of attempts: 3
Assignment Alignment - 707 entries

line up the operators. Use spaces, not tabs.

  • Best score: 18
  • Best player score: 41
  • Number of attempts: 1
Readable Rubyhash - 232 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
  • Number of attempts: 2
SFD-ROC: ROT13 Phonics - 70 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
  • Number of attempts: 2
Multiplication table. - 182 entries

Create a multiplication table.

  • Best score: 31
  • Best player score: 64
  • Number of attempts: 1
Flodder-challenge - 814 entries

Replace the text the most efficient and win!

  • Best score: 27
  • Best player score: 35
  • Number of attempts: 2
fib.c cleanup - 56 entries

cleanup the file

  • Best score: 15
  • Best player score: 16
  • Number of attempts: 1
The name of the game - 588 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 4
NATO phonetic alphabet - 407 entries

Transform the series of words into a list.

  • Best score: 19
  • Best player score: 21
  • Number of attempts: 1
Let's play some Ivmgolf - 945 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 9
  • Number of attempts: 4
The Quick Brown Fox Jumps Over The Lazy Vim - 330 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: 10
  • Best player score: 10
  • Number of attempts: 2
Simple text editing with Vim - 10703 entries

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

  • Best score: 13
  • Best player score: 18
  • Number of attempts: 3
Shebangs for all - 1643 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
  • Number of attempts: 2
Stairs Indenting - 360 entries

Indent each line with <line number> whitespaces.

  • Best score: 12
  • Best player score: 27
  • Number of attempts: 2
Swap assigned value - 500 entries

Simple problem but looking for interesting solutions.

  • Best score: 10
  • Best player score: 21
  • Number of attempts: 1
Checkerboard case pattern - 106 entries

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

  • Best score: 15
  • Best player score: 26
  • Number of attempts: 3
Vertical Limit - 2168 entries

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

  • Best score: 21
  • Best player score: 28
  • Number of attempts: 1
Whitespace, empty lines and tabs - 2603 entries

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

  • Best score: 16
  • Best player score: 29
  • Number of attempts: 1
lamb had a little Mary - 507 entries

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

  • Best score: 16
  • Best player score: 36
  • Number of attempts: 3
Eric Andres
Twitter:

entered into 29 challenges

contributed 0 challenges