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

Minimalist Limerick - 481 entries

Reproduce this lovely poem.

  • Best score: 31
  • Best player score: 38
  • Number of attempts: 1
Prefixes and suffixes - 506 entries

Generate all prefixes of "vimchallenge", then all suffixes.

  • Best score: 17
  • Best player score: 38
  • Number of attempts: 1
Create Leading Zeros - 192 entries

Create leading zeros only for id columns. Please use generic approach!

  • Best score: 23
  • Best player score: 28
  • Number of attempts: 2
Words in parens - 11272 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 27
  • Number of attempts: 1
Pairs of numbers - 325 entries

Line 1 represents x, line 2 y-data. Bring the corresponding pairs in the form "[x,y]\n"

  • Best score: 26
  • Best player score: 67
  • Number of attempts: 1
Swap values - 3692 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 16
  • Number of attempts: 2
switch variable - 4382 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 16
  • Number of attempts: 2
The Cake is a Lie - 1136 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 11
  • Number of attempts: 1
Simple text editing with Vim - 10599 entries

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

  • Best score: 13
  • Best player score: 15
  • Number of attempts: 2
Delete unwanted lines - 336 entries

Delete all lines which does not end in "o.."

  • Best score: 9
  • Best player score: 9
  • Number of attempts: 3
Ruby 1.9 hashes - 1080 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: 12
  • Best player score: 19
  • Number of attempts: 2
Append semicolon after expressions - 875 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 4
Carriage return - 41 entries

I have some raw data from terminal output which uses carriege return for formatting. Carriage return sets the pointer to the first character on the line, and subsequent characters will overwrite what was there before. The challange is to simulate the terminal behaviour in vim. I'm kind of unsure if I should have skipped lines 9 and 15, since there might be some interesting solutions which are not that generic. Happy Golfing!

  • Best score: 22
  • Best player score: 38
  • Number of attempts: 1
A Simple One - 848 entries

Here is a very simple one - just to illustrate/introduce a vim feature that some people seem to miss...

  • Best score: 9
  • Best player score: 9
  • Number of attempts: 1
Extract argument from function - 2037 entries

The aim is to see if you can do some refactoring very fast.

  • Best score: 13
  • Best player score: 17
  • Number of attempts: 2
Switch function arguments - 1843 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 9
Hole-in-one - 941 entries

Lets take this golf thing literally.. Drive off the tee into the hole, and of course you don't strike the ball completely clean.

  • Best score: 15
  • Best player score: 23
  • Number of attempts: 2
Count both ways - 880 entries

Right AND down.

  • Best score: 13
  • Best player score: 13
  • Number of attempts: 3
VimGolfNight - 458 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 13
  • Number of attempts: 2
Make it more readable - 1765 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 14
  • Number of attempts: 3
Collect List - 3578 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 15
  • Number of attempts: 4
codegourmet
Twitter:

Kung fu & Software Engineering enthusiast.

entered into 21 challenges

contributed 0 challenges