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

Simple, Practical, and Common - 33621 entries

Simple things we do all the time should be able to be done with very few keystrokes, but sometimes I find something I need to do makes me go, "There MUST be a better way." This challenge is just a simple movement and entering text at a certain place.

  • Best score: 22
  • Best player score: 25
  • Position: #3152 / 7422
  • Number of attempts: 5
Swap values - 4616 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 11
  • Position: #6 / 1268
  • Number of attempts: 7
V to the i - 4806 entries

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

  • Best score: 7
  • Best player score: 8
  • Position: #947 / 1894
  • Number of attempts: 4
Add semicolons - 10860 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 10
  • Position: #178 / 3064
  • Number of attempts: 5
Extract argument from function - 2357 entries

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

  • Best score: 13
  • Best player score: 17
  • Position: #592 / 753
  • Number of attempts: 1
Search and Replace 0 - 4989 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #363 / 1624
  • Number of attempts: 4
That hyphen - 2595 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 12
  • Position: #433 / 701
  • Number of attempts: 6
Just the middle - 11457 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 7
  • Position: #254 / 4198
  • Number of attempts: 3
Basic renumbering - 5648 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 30
  • Position: #1214 / 1264
  • Number of attempts: 1
readability - 327 entries

Make the code readable by adding some spaces

  • Best score: 18
  • Best player score: 18
  • Position: #36 / 152
  • Number of attempts: 4
Fix the XML - 1039 entries

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

  • Best score: 18
  • Best player score: 26
  • Position: #193 / 290
  • Number of attempts: 5
I forgot quotes - 15989 entries

Oops.

  • Best score: 10
  • Best player score: 10
  • Position: #168 / 4181
  • Number of attempts: 4
learn vim in short time - 240 entries

so happy to learn vim.because vim is awesome

  • Best score: 8
  • Best player score: 8
  • Position: #51 / 161
  • Number of attempts: 2
Count both ways - 1022 entries

Right AND down.

  • Best score: 13
  • Best player score: 18
  • Position: #321 / 354
  • Number of attempts: 3
NBCU Weekly Challenge - Test - 253 entries

Just testing.

  • Best score: 18
  • Best player score: 21
  • Position: #109 / 116
  • Number of attempts: 5
Winding path - 122 entries

It's a maze, but the bad paths have been blocked off. Mark the correct path.

  • Best score: 27
  • Best player score: 96
  • Position: #38 / 42
  • Number of attempts: 1
A HAPPY NEW YEAR 2014 ! - 10669 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 20
  • Position: #3546 / 3684
  • Number of attempts: 2
quotes inside quotes - 3159 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: 14
  • Position: #178 / 1078
  • Number of attempts: 10
SFD-ROC: vimvimvim - 1606 entries

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

  • Best score: 8
  • Best player score: 8
  • Position: #64 / 446
  • Number of attempts: 4
Saving the hashes(#) - 2063 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: #337 / 480
  • Number of attempts: 7
Vertical Limit - 2538 entries

transform a succession of one word lines to a an array of strings

  • Best score: 21
  • Best player score: 26
  • Position: #467 / 754
  • Number of attempts: 4
replacing each line of a block selection - 2999 entries

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

  • Best score: 18
  • Best player score: 28
  • Position: #604 / 777
  • Number of attempts: 3
Rotating Philosophers Problem - 410 entries

Can you help the philosophers find a good place to sit before they get five forks and spaghetti?

  • Best score: 29
  • Best player score: 32
  • Position: #119 / 166
  • Number of attempts: 4
The Cake is a Lie - 1346 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 9
  • Position: #197 / 527
  • Number of attempts: 4
Simple text editing with Vim - 12815 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #1383 / 3696
  • Number of attempts: 8
Wade
Twitter:

entered into 25 challenges

contributed 0 challenges