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 - 32962 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: #2769 / 7276
  • Number of attempts: 3
Split line with dots - 2103 entries

This line is too long, split it.

  • Best score: 15
  • Best player score: 22
  • Position: #444 / 623
  • Number of attempts: 1
That hyphen - 2500 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 13
  • Position: #495 / 683
  • Number of attempts: 1
Just the middle - 11141 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #1773 / 4114
  • Number of attempts: 6
Basic renumbering - 5436 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 18
  • Position: #627 / 1228
  • Number of attempts: 2
Restore order to the alphabet - 182 entries

The numbers are OK. The letters are wonky.

  • Best score: 12
  • Best player score: 13
  • Position: #21 / 65
  • Number of attempts: 3
Swap assigned value - 561 entries

Simple problem but looking for interesting solutions.

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

Based on "The name of the game".

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

Try to swap or reverse the line as needed.

  • Best score: 16
  • Best player score: 18
  • Position: #55 / 62
  • Number of attempts: 2
Space out the alphabet - 1595 entries

Put 3 spaces between adjacent letters.

  • Best score: 15
  • Best player score: 27
  • Position: #396 / 434
  • Number of attempts: 1
Condensed Cases - 758 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: #215 / 231
  • Number of attempts: 1
-a-b-c- - 3118 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 15
  • Position: #547 / 1112
  • Number of attempts: 2
Change name of a variable - 163 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 / 127
  • Number of attempts: 1
120 Degrees - 441 entries

Rotate that triangle.

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

We should all ace this, right?

  • Best score: 13
  • Best player score: 16
  • Position: #2205 / 3919
  • Number of attempts: 5
Prefixes and suffixes - 567 entries

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

  • Best score: 17
  • Best player score: 28
  • Position: #122 / 185
  • Number of attempts: 1
Let's play some Ivmgolf - 1015 entries

Oops, I spelled that wrong.

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

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

  • Best score: 6
  • Best player score: 8
  • Position: #202 / 241
  • Number of attempts: 2
The meaning - 522 entries

Numbers are fun!

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

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

  • Best score: 19
  • Best player score: 36
  • Position: #107 / 174
  • Number of attempts: 2
Table Reshuffle - 357 entries

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

  • Best score: 22
  • Best player score: 36
  • Position: #87 / 128
  • Number of attempts: 1
Ruby 1.9 compat - 597 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: #142 / 226
  • Number of attempts: 1
Reverse Simple Deletion - 772 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 12
  • Position: #304 / 432
  • Number of attempts: 1
Reverse characters in a line - 645 entries

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

  • Best score: 12
  • Best player score: 15
  • Position: #125 / 236
  • Number of attempts: 5
Adrien Fabre
Twitter:

entered into 24 challenges

contributed 0 challenges