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 - 34012 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: 24
  • Position: #2851 / 7513
  • Number of attempts: 3
Split line with dots - 2175 entries

This line is too long, split it.

  • Best score: 15
  • Best player score: 22
  • Position: #450 / 639
  • Number of attempts: 1
That hyphen - 2646 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 13
  • Position: #511 / 711
  • Number of attempts: 1
Just the middle - 11616 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #1815 / 4255
  • Number of attempts: 6
Basic renumbering - 5736 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 18
  • Position: #663 / 1280
  • Number of attempts: 2
Restore order to the alphabet - 209 entries

The numbers are OK. The letters are wonky.

  • Best score: 12
  • Best player score: 13
  • Position: #25 / 73
  • Number of attempts: 3
Swap assigned value - 694 entries

Simple problem but looking for interesting solutions.

  • Best score: 10
  • Best player score: 10
  • Position: #75 / 263
  • Number of attempts: 2
VimGolfNight - 602 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Position: #218 / 356
  • Number of attempts: 1
swap or reverse - 132 entries

Try to swap or reverse the line as needed.

  • Best score: 16
  • Best player score: 18
  • Position: #64 / 72
  • Number of attempts: 2
Space out the alphabet - 1693 entries

Put 3 spaces between adjacent letters.

  • Best score: 15
  • Best player score: 27
  • Position: #413 / 457
  • Number of attempts: 1
Condensed Cases - 827 entries

Apple's new programming language, Swift, allows two style of case statements: 1) one Enum case on each line, or 2) multiple Enum cases on a single line. Convert the following from the first case (no pun intended) to the second type.

  • Best score: 12
  • Best player score: 22
  • Position: #233 / 254
  • Number of attempts: 1
-a-b-c- - 3241 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 15
  • Position: #567 / 1146
  • Number of attempts: 2
Change name of a variable - 196 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: #91 / 147
  • Number of attempts: 1
120 Degrees - 517 entries

Rotate that triangle.

  • Best score: 14
  • Best player score: 14
  • Position: #22 / 147
  • Number of attempts: 5
Words in parens - 13053 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 16
  • Position: #2252 / 3991
  • Number of attempts: 5
Prefixes and suffixes - 668 entries

Generate all prefixes of "vimchallenge", then all suffixes.

  • Best score: 17
  • Best player score: 28
  • Position: #131 / 207
  • Number of attempts: 1
Let's play some Ivmgolf - 1162 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 7
  • Position: #81 / 459
  • Number of attempts: 2
Remove semicolons after expressions - 685 entries

A follow-up for http://vimgolf.com/challenges/4fc9d767d3a0d4000100000e.

  • Best score: 6
  • Best player score: 8
  • Position: #225 / 270
  • Number of attempts: 2
The meaning - 588 entries

Numbers are fun!

  • Best score: 5
  • Best player score: 5
  • Position: #249 / 368
  • Number of attempts: 1
Ugly spreadsheet copy/paste to CSV - 1046 entries

convert an ugly spreadsheet copy/paste into a CSV format.

  • Best score: 19
  • Best player score: 36
  • Position: #120 / 199
  • Number of attempts: 2
Table Reshuffle - 468 entries

Fix the column order in this table... also append the new 'username' column.

  • Best score: 22
  • Best player score: 36
  • Position: #95 / 145
  • Number of attempts: 1
Ruby 1.9 compat - 661 entries

Remember when Ruby supported `when <expr> :`? Well, it doesn't in 1.9, so let's make sure we use `then`, without ruining our lovely new hash syntax!

  • Best score: 14
  • Best player score: 17
  • Position: #157 / 241
  • Number of attempts: 1
Reverse Simple Deletion - 874 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 12
  • Position: #315 / 466
  • Number of attempts: 1
Reverse characters in a line - 844 entries

You have everything you need, just not in the right order. Mastermind would give you 26 white pegs.

  • Best score: 8
  • Best player score: 15
  • Position: #151 / 282
  • Number of attempts: 5
Adrien Fabre
Twitter:

entered into 24 challenges

contributed 0 challenges