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 - 33866 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: #2444 / 7474
  • Number of attempts: 10
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: 19
  • Position: #685 / 759
  • Number of attempts: 3
That hyphen - 2602 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 9
  • Position: #83 / 704
  • Number of attempts: 5
Just the middle - 11541 entries

Delete the instructions at the top and bottom.

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

Little role switching.

  • Best score: 12
  • Best player score: 14
  • Position: #880 / 2146
  • Number of attempts: 4
Vim's not included features - 244 entries

Filter not included (-) features in a hypothetical installation of vim.

  • Best score: 23
  • Best player score: 25
  • Position: #23 / 66
  • Number of attempts: 6
Assign numbers to fields - 116 entries

You are given a list of space-separated strings. Add an increasing numeric prefix to each one.

  • Best score: 19
  • Best player score: 20
  • Position: #41 / 62
  • Number of attempts: 1
Mirror Symmetry - 822 entries

Add backslashes.

  • Best score: 7
  • Best player score: 14
  • Position: #233 / 269
  • Number of attempts: 2
Collect List - 4317 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 12
  • Position: #81 / 1194
  • Number of attempts: 8
VimGolfNight - 575 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Position: #224 / 352
  • Number of attempts: 3
camel riding - 793 entries

add a prefix on some camelCase variables

  • Best score: 15
  • Best player score: 17
  • Position: #189 / 281
  • Number of attempts: 2
Shuffled numbers - 246 entries

Each number is paired with the number it should follow. That's enough information to put them in order.

  • Best score: 15
  • Best player score: 27
  • Position: #94 / 96
  • Number of attempts: 1
Condensed Cases - 807 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: 13
  • Position: #85 / 248
  • Number of attempts: 6
I forgot quotes - 16093 entries

Oops.

  • Best score: 10
  • Best player score: 16
  • Position: #2498 / 4202
  • Number of attempts: 4
-a-b-c- - 3225 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 15
  • Position: #586 / 1140
  • Number of attempts: 1
Mess in revision history - 1210 entries

Help Joe clean up what Steve has cobbled.

  • Best score: 17
  • Best player score: 28
  • Position: #180 / 254
  • Number of attempts: 4
Shuffle puzzle - 346 entries

Sort the lines in each indent group, and sort the groups. That's the pattern. Or just move lines around manually to get a better score.

  • Best score: 13
  • Best player score: 15
  • Position: #65 / 104
  • Number of attempts: 3
A HAPPY NEW YEAR 2014 ! - 10713 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 16
  • Position: #3291 / 3700
  • Number of attempts: 1
attr_aligner - 3525 entries

Two attr keywords. Two separate indentations. Align the colons.

  • Best score: 19
  • Best player score: 31
  • Position: #434 / 706
  • Number of attempts: 4
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: 13
  • Position: #405 / 520
  • Number of attempts: 2
Words in parens - 12992 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #607 / 3977
  • Number of attempts: 7
Vertical Limit - 2596 entries

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

  • Best score: 21
  • Best player score: 25
  • Position: #365 / 767
  • Number of attempts: 8
switch variable - 5094 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 14
  • Position: #1396 / 1754
  • Number of attempts: 1
Make it more readable - 2009 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 15
  • Position: #289 / 652
  • Number of attempts: 3
Shebangs for all - 2049 entries

We've all seen or used a shebang once or twice. Ditch the specific paths and leave just a dynamic Ruby and Python bath behind.

  • Best score: 11
  • Best player score: 15
  • Position: #282 / 523
  • Number of attempts: 4
Make Fancy Header - 1075 entries

Make the header text stand out with surrounding asterisks

  • Best score: 15
  • Best player score: 16
  • Position: #100 / 349
  • Number of attempts: 6
Reconstruct the Sentence - 1677 entries

Get the sentence back in the proper order, remove duplicate lines, and then combine the separate lines into one.

  • Best score: 19
  • Best player score: 24
  • Position: #323 / 440
  • Number of attempts: 2
Reformat/Refactor a Golfer Class - 7389 entries

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

  • Best score: 7
  • Best player score: 42
  • Position: #1016 / 1825
  • Number of attempts: 3
Ben Vandervalk
Twitter:

entered into 28 challenges

contributed 0 challenges