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 - 33586 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: 23
  • Position: #2536 / 7409
  • Number of attempts: 5
Extract argument from function - 2355 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #84 / 752
  • Number of attempts: 6
Search and Replace 0 - 4976 entries

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

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

"vim vi improved"

  • Best score: 9
  • Best player score: 9
  • Position: #10 / 701
  • Number of attempts: 4
Just the middle - 11423 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #2311 / 4185
  • Number of attempts: 1
Vice versa - 7903 entries

Little role switching.

  • Best score: 12
  • Best player score: 13
  • Position: #757 / 2125
  • Number of attempts: 5
I forgot quotes - 15974 entries

Oops.

  • Best score: 10
  • Best player score: 14
  • Position: #1674 / 4175
  • Number of attempts: 4
vim1001 - 307 entries

change number 1001 into a "vim1001 sequence". (My first challenge, hope it is not too bad... )

  • Best score: 17
  • Best player score: 21
  • Position: #26 / 110
  • Number of attempts: 4
Subtraction - 180 entries

Solve the equations.

  • Best score: 18
  • Best player score: 30
  • Position: #49 / 62
  • Number of attempts: 1
-a-b-c- - 3213 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 13
  • Position: #26 / 1137
  • Number of attempts: 3
Count both ways - 1022 entries

Right AND down.

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

Just testing.

  • Best score: 18
  • Best player score: 18
  • Position: #29 / 116
  • Number of attempts: 2
Change name of a variable - 179 entries

Replace the name of the $variable with the fastest move possible. The challenge is having a command that allow you to easily change the variable name even if its indented.

  • Best score: 9
  • Best player score: 9
  • Position: #65 / 137
  • Number of attempts: 1
Lisp Condense - 460 entries

Reduce 4 cons selection operations down to one function call.

  • Best score: 13
  • Best player score: 13
  • Position: #17 / 158
  • Number of attempts: 6
Two become one - 713 entries

We have two c arrays and want to make one two dimensional out of it. Can we do that?

  • Best score: 25
  • Best player score: 36
  • Position: #167 / 208
  • Number of attempts: 4
Where should I put the Newline? - 881 entries

Help me put the newline.

  • Best score: 7
  • Best player score: 7
  • Position: #102 / 437
  • Number of attempts: 2
Mess in revision history - 1183 entries

Help Joe clean up what Steve has cobbled.

  • Best score: 17
  • Best player score: 17
  • Position: #25 / 249
  • Number of attempts: 8
A HAPPY NEW YEAR 2014 ! - 10657 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 13
  • Position: #2516 / 3679
  • Number of attempts: 1
quotes inside quotes - 3157 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
  • Position: #592 / 1076
  • Number of attempts: 2
Words in parens - 12928 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #429 / 3960
  • Number of attempts: 5
Delete unwanted lines - 408 entries

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

  • Best score: 9
  • Best player score: 12
  • Position: #217 / 228
  • Number of attempts: 1
Saving the hashes(#) - 2053 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: 21
  • Position: #101 / 479
  • Number of attempts: 5
Let's play some Ivmgolf - 1118 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 14
  • Position: #423 / 445
  • Number of attempts: 1
Vertical Limit - 2538 entries

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

  • Best score: 21
  • Best player score: 25
  • Position: #352 / 754
  • Number of attempts: 4
Exchanging Quotes - 854 entries

Sometimes you need to exchange a choice of quotes in some code.

  • Best score: 30
  • Best player score: 40
  • Position: #190 / 229
  • Number of attempts: 1
Switch function arguments - 2123 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 11
  • Position: #104 / 658
  • Number of attempts: 4
Append semicolon after expressions - 1047 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 11
  • Position: #78 / 414
  • Number of attempts: 3
switch variable - 5068 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 11
  • Position: #320 / 1747
  • Number of attempts: 3
Make it more readable - 1988 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 13
  • Position: #59 / 647
  • Number of attempts: 6
HTML to Haml - 878 entries

Help convert this HTML page to Haml.

  • Best score: 23
  • Best player score: 41
  • Position: #124 / 204
  • Number of attempts: 3
Numbering a List - 1931 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 21
  • Position: #405 / 652
  • Number of attempts: 2
Sort and add attributes - 1431 entries

Sort the states and add the attribute country to each record.

  • Best score: 33
  • Best player score: 34
  • Position: #347 / 556
  • Number of attempts: 2
Simple text editing with Vim - 12712 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #293 / 3671
  • Number of attempts: 5
Reformat/Refactor a Golfer Class - 6901 entries

A simple case of removing unneeded code and fixing broken indentation.

  • Best score: 28
  • Best player score: 41
  • Position: #888 / 1690
  • Number of attempts: 3
Bill Booth
Twitter:

entered into 34 challenges

contributed 0 challenges