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

Extract argument from function - 2376 entries

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

  • Best score: 13
  • Best player score: 15
  • Position: #446 / 759
  • Number of attempts: 2
Search and Replace 0 - 5027 entries

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

  • Best score: 12
  • Best player score: 14
  • Position: #1015 / 1637
  • Number of attempts: 2
Just the middle - 11541 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #2081 / 4230
  • Number of attempts: 2
Vice versa - 7974 entries

Little role switching.

  • Best score: 12
  • Best player score: 16
  • Position: #1202 / 2146
  • Number of attempts: 2
Swap assigned value - 671 entries

Simple problem but looking for interesting solutions.

  • Best score: 10
  • Best player score: 11
  • Position: #176 / 259
  • Number of attempts: 1
Count both ways - 1022 entries

Right AND down.

  • Best score: 13
  • Best player score: 16
  • Position: #241 / 354
  • Number of attempts: 1
Don't know what this is - 2025 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: 16
  • Position: #506 / 587
  • Number of attempts: 1
A HAPPY NEW YEAR 2014 ! - 10713 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 13
  • Position: #2582 / 3700
  • Number of attempts: 1
Letter case trickery - 1644 entries

This file is in a downright esoteric format, consisting of hexadecimal numbers, non-hexadecimal keywords, and "Z" indicating end-of-line. Make the hexadecimal numbers lowercase.

  • Best score: 9
  • Best player score: 14
  • Position: #442 / 520
  • Number of attempts: 1
Words in parens - 12992 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 19
  • Position: #3107 / 3977
  • Number of attempts: 2
SFD-ROC: vimvimvim - 1620 entries

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

  • Best score: 8
  • Best player score: 9
  • Position: #225 / 450
  • Number of attempts: 1
Saving the hashes(#) - 2067 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: 29
  • Position: #344 / 480
  • Number of attempts: 1
Switch function arguments - 2182 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 13
  • Position: #417 / 674
  • Number of attempts: 1
Append semicolon after expressions - 1061 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 12
  • Position: #232 / 421
  • Number of attempts: 1
switch variable - 5094 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 14
  • Position: #1401 / 1754
  • Number of attempts: 1
A Simple One - 1067 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
  • Position: #419 / 671
  • Number of attempts: 1
Reverse Simple Deletion - 862 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 12
  • Position: #319 / 463
  • Number of attempts: 1
Simple text editing with Vim - 13262 entries

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

  • Best score: 13
  • Best player score: 17
  • Position: #2531 / 3810
  • Number of attempts: 1
fuck GFW
Twitter:

entered into 18 challenges

contributed 0 challenges