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

Fill visual area - 70 entries

Just have fun!

  • Best score: 20
  • Best player score: 31
  • Number of attempts: 2
Words in parens - 12372 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 15
  • Number of attempts: 3
Count both ways - 931 entries

Right AND down.

  • Best score: 13
  • Best player score: 16
  • Number of attempts: 1
learn vim in short time - 206 entries

so happy to learn vim.because vim is awesome

  • Best score: 8
  • Best player score: 8
  • Number of attempts: 1
Fix the XML - 920 entries

The challenge consists in having a valid xml from an incomplete source.

  • Best score: 18
  • Best player score: 21
  • Number of attempts: 3
Shuffled numbers - 203 entries

Each number is paired with the number it should follow. That's enough information to put them in order.

  • Best score: 15
  • Best player score: 16
  • Number of attempts: 1
Not enough Ps - 59 entries

Different type of code

  • Best score: 13
  • Best player score: 13
  • Number of attempts: 1
-a-b-c- - 3004 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 15
  • Number of attempts: 2
quotes inside quotes - 2973 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: 2
V to the i - 4507 entries

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

  • Best score: 7
  • Best player score: 8
  • Number of attempts: 2
Search and Replace 0 - 4479 entries

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

  • Best score: 12
  • Best player score: 14
  • Number of attempts: 2
Simple text editing with Vim - 11191 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: 6
camel riding - 731 entries

add a prefix on some camelCase variables

  • Best score: 15
  • Best player score: 16
  • Number of attempts: 1
Gray area - 669 entries

It's a golf metaphor or something.

  • Best score: 11
  • Best player score: 13
  • Number of attempts: 1
Space out the alphabet - 1480 entries

Put 3 spaces between adjacent letters.

  • Best score: 15
  • Best player score: 19
  • Number of attempts: 2
That hyphen - 2411 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 12
  • Number of attempts: 3
Just the middle - 10822 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 7
  • Number of attempts: 3
I forgot quotes - 15122 entries

Oops.

  • Best score: 10
  • Best player score: 14
  • Number of attempts: 5
Basic renumbering - 5262 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 21
  • Number of attempts: 4
Logging with key - 280 entries

Sometimes it is better to log with meaningful key

  • Best score: 21
  • Best player score: 22
  • Number of attempts: 4
Where should I put the Newline? - 830 entries

Help me put the newline.

  • Best score: 7
  • Best player score: 8
  • Number of attempts: 1
Compile C - 281 entries

You might have to get clever to do this one.

  • Best score: 19
  • Best player score: 23
  • Number of attempts: 4
Interleave lines - 127 entries

This is some kind of « paste -d'\n' c b a ». There are many ways to achieve this.. just find the shortest!

  • Best score: 17
  • Best player score: 26
  • Number of attempts: 4
Mute the second method of this script - 420 entries

prepend a # infront of every line of the second method

  • Best score: 9
  • Best player score: 9
  • Number of attempts: 3
Extract argument from function - 2138 entries

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

  • Best score: 13
  • Best player score: 15
  • Number of attempts: 1
Happy TvvO - 370 entries

Don’t forget the past, learn from it. Happy New Year.

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 2
Mariano Macchi
Twitter:

entered into 26 challenges

contributed 0 challenges