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

Do you demand a shrubbery? - 1035 entries

Use :redir and crush the emacsgolfers.

  • Best score: 15
  • Best player score: 36
  • Number of attempts: 1
Mess in revision history - 1015 entries

Help Joe clean up what Steve has cobbled.

  • Best score: 17
  • Best player score: 29
  • Number of attempts: 6
Saving the hashes(#) - 1806 entries

The following file is copied from vimcasts.org(Its only for learning purpose,hope the site owner doesn't mind it), its probably the easiest of challenges.Our goal is to delete every line which doesn't contain a hash signs. The remaining hash signs with numbers are then sorted to get the final output.

  • Best score: 20
  • Best player score: 28
  • Number of attempts: 6
Don't know what this is - 1809 entries

Replace contents of brackets with matching number of spaces. Don't ask what the format's supposed to be.

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 7
Extract argument from function - 2061 entries

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

  • Best score: 13
  • Best player score: 14
  • Number of attempts: 5
switch variable - 4448 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 9
V to the i - 4148 entries

Input is 99 V's. Output is 100 i's.

  • Best score: 7
  • Best player score: 8
  • Number of attempts: 11
SFD-ROC: vimvimvim - 1324 entries

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

  • Best score: 8
  • Best player score: 8
  • Number of attempts: 13
VimGolfNight - 463 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 3
Make it more readable - 1775 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 13
  • Number of attempts: 5
Let's play some Ivmgolf - 945 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 9
  • Number of attempts: 1
The Cake is a Lie - 1140 entries

Correct the capitalization of each word

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

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

  • Best score: 13
  • Best player score: 17
  • Number of attempts: 7
Where should I put the Newline? - 808 entries

Help me put the newline.

  • Best score: 7
  • Best player score: 8
  • Number of attempts: 6
Append semicolon after expressions - 881 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 13
  • Number of attempts: 1
Words in parens - 11430 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 14
  • Number of attempts: 9
Neither Fizz nor Buzz - 191 entries

Not your regular increment macro! The gaps are tricky.

  • Best score: 13
  • Best player score: 15
  • Number of attempts: 7
A HAPPY NEW YEAR 2014 ! - 9771 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 4
Switch function arguments - 1857 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 8
Search and Replace 0 - 4226 entries

Replace every instance of 'aaa' with 'xaaax'.

  • Best score: 12
  • Best player score: 15
  • Number of attempts: 2
quotes inside quotes - 2844 entries

taken from tip 85 of the very good book 'Practical Vim: Edit Text at the Speed of Thought' ! I'd be interested what people use :)

  • Best score: 14
  • Best player score: 16
  • Number of attempts: 4
replacing each line of a block selection - 2604 entries

replace each line's ../assets/js with /javascripts

  • Best score: 18
  • Best player score: 19
  • Number of attempts: 7
attr_aligner - 3086 entries

Two attr keywords. Two separate indentations. Align the colons.

  • Best score: 19
  • Best player score: 22
  • Number of attempts: 11
Shuffle puzzle - 289 entries

Sort the lines in each indent group, and sort the groups. That's the pattern. Or just move lines around manually to get a better score.

  • Best score: 13
  • Best player score: 21
  • Number of attempts: 1
Assignment Alignment - 707 entries

line up the operators. Use spaces, not tabs.

  • Best score: 18
  • Best player score: 23
  • Number of attempts: 6
PLS
Twitter:

entered into 25 challenges

contributed 0 challenges