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

Simple problem but looking for interesting solutions.

  • Best score: 10
  • Best player score: 21
  • Number of attempts: 1
Groups magic - 140 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
fib.c cleanup - 58 entries

cleanup the file

  • Best score: 15
  • Best player score: 16
  • Number of attempts: 1
abcd > a b c d - 248 entries

transform the single spaces into 4 spaces repeat for each line

  • Best score: 15
  • Best player score: 15
  • Number of attempts: 1
lamb had a little Mary - 537 entries

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

  • Best score: 16
  • Best player score: 36
  • Number of attempts: 3
Checkerboard case pattern - 127 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
Readable Rubyhash - 233 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
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
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
A simple change - 377 entries

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

  • Best score: 12
  • Best player score: 15
  • Number of attempts: 2
Let's play some Ivmgolf - 976 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 9
  • Number of attempts: 4
Sort by your own sum - 49 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
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
  • Number of attempts: 2
Stairs Indenting - 384 entries

Indent each line with <line number> whitespaces.

  • Best score: 12
  • Best player score: 27
  • Number of attempts: 2
SFD-ROC: ROT13 Phonics - 71 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
SFD-ROC: vimvimvim - 1423 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
The name of the game - 597 entries

End up with the name of the game.

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

Transform the series of words into a list.

  • Best score: 19
  • Best player score: 21
  • Number of attempts: 1
The Quick Brown Fox Jumps Over The Lazy Vim - 344 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
Vertical Limit - 2264 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
switch variable - 4806 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 14
  • Number of attempts: 3
Multiplication table. - 183 entries

Create a multiplication table.

  • Best score: 31
  • Best player score: 64
  • Number of attempts: 1
Assignment Alignment - 722 entries

line up the operators. Use spaces, not tabs.

  • Best score: 18
  • Best player score: 41
  • Number of attempts: 1
Shebangs for all - 1694 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
Sort and add attributes - 1113 entries

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

  • Best score: 33
  • Best player score: 38
  • Number of attempts: 2
Flodder-challenge - 829 entries

Replace the text the most efficient and win!

  • Best score: 27
  • Best player score: 35
  • Number of attempts: 2
Whitespace, empty lines and tabs - 2733 entries

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

  • Best score: 16
  • Best player score: 29
  • Number of attempts: 1
Simple text editing with Vim - 11231 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
Reformat/Refactor a Golfer Class - 5745 entries

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

  • Best score: 32
  • Best player score: 41
  • Number of attempts: 1
Eric Andres
Twitter:

entered into 29 challenges

contributed 0 challenges