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

Wget failed to download redirections - 250 entries

Output of a wget session, where 302 where not properly handled due to certificate problems, has been saved to a file. Keep the correct URLs to start again downloading.

  • Best score: 15
  • Best player score: 24
  • Position: #58 / 73
  • Number of attempts: 2
V to the i - 4887 entries

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

  • Best score: 7
  • Best player score: 9
  • Position: #1571 / 1916
  • Number of attempts: 1
Wrap the text of an email message to 79 characters - 873 entries

You're replying to an email with silly long lines. Clean them up.

  • Best score: 5
  • Best player score: 5
  • Position: #208 / 455
  • Number of attempts: 1
Search and Replace 0 - 5167 entries

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

  • Best score: 12
  • Best player score: 15
  • Position: #1153 / 1677
  • Number of attempts: 1
That hyphen - 2649 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 11
  • Position: #312 / 712
  • Number of attempts: 2
Just the middle - 11630 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 9
  • Position: #3261 / 4261
  • Number of attempts: 2
Python Hello World! Reformatting - 1057 entries

A novice Python using prints Hello World! and a pro shows him different way. Using vim to get into pro style from novice, win the challenge.

  • Best score: 39
  • Best player score: 42
  • Position: #127 / 402
  • Number of attempts: 2
Basic renumbering - 5737 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 24
  • Position: #1103 / 1281
  • Number of attempts: 1
Refactoring useless Method away - 135 entries

Real-life challenge, convert a bunch of ifs to a switch statement

  • Best score: 47
  • Best player score: 56
  • Position: #16 / 38
  • Number of attempts: 2
Test everything! - 214 entries

... and build the desired input data structure. Transform a list of values into a non-trivial format.

  • Best score: 21
  • Best player score: 33
  • Position: #37 / 59
  • Number of attempts: 2
Condensed Cases - 829 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: 16
  • Position: #186 / 255
  • Number of attempts: 2
I forgot quotes - 16240 entries

Oops.

  • Best score: 10
  • Best player score: 16
  • Position: #2437 / 4226
  • Number of attempts: 2
learn vim in short time - 248 entries

so happy to learn vim.because vim is awesome

  • Best score: 8
  • Best player score: 9
  • Position: #146 / 168
  • Number of attempts: 1
Replace Parameter with Explicit Methods - 103 entries

Implementing the methods of a Java Interface

  • Best score: 33
  • Best player score: 41
  • Position: #16 / 31
  • Number of attempts: 4
-a-b-c- - 3242 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 15
  • Position: #519 / 1147
  • Number of attempts: 2
Change name of a variable - 197 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: #84 / 148
  • Number of attempts: 2
Gray area - 765 entries

It's a golf metaphor or something.

  • Best score: 11
  • Best player score: 13
  • Position: #165 / 277
  • Number of attempts: 4
Refactor static member invocation - 235 entries

Someone used a static method. Refactor the method into a static import while fixing the assertion.

  • Best score: 28
  • Best player score: 35
  • Position: #41 / 68
  • Number of attempts: 3
Comparing scores - 148 entries

If Alice and Bob both did the challenge, put their entries together in the top paragraph, so we can compare their scores more easily.

  • Best score: 18
  • Best player score: 51
  • Position: #32 / 37
  • Number of attempts: 1
Where should I put the Newline? - 912 entries

Help me put the newline.

  • Best score: 7
  • Best player score: 7
  • Position: #128 / 451
  • Number of attempts: 2
Words in parens - 13058 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 16
  • Position: #2201 / 3993
  • Number of attempts: 1
Hole-in-one - 1041 entries

Lets take this golf thing literally.. Drive off the tee into the hole, and of course you don't strike the ball completely clean.

  • Best score: 15
  • Best player score: 19
  • Position: #186 / 308
  • Number of attempts: 2
Delete unwanted lines - 451 entries

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

  • Best score: 9
  • Best player score: 9
  • Position: #144 / 237
  • Number of attempts: 2
Enumerate words - 279 entries

Enumerate the unique words in order.

  • Best score: 23
  • Best player score: 27
  • Position: #70 / 96
  • Number of attempts: 1
abcd > a b c d - 310 entries

transform the single spaces into 4 spaces repeat for each line

  • Best score: 15
  • Best player score: 15
  • Position: #149 / 232
  • Number of attempts: 1
NATO phonetic alphabet - 554 entries

Transform the series of words into a list.

  • Best score: 19
  • Best player score: 25
  • Position: #168 / 201
  • Number of attempts: 2
The Quick Brown Fox Jumps Over The Lazy Vim - 464 entries

Someone has vandalized this text file and replaced the beginning character of one word in each line with a Big "X." Please remove the big X's, and fix each line to read "The Quick Brown Fox Jumps Over The Lazy Dog."

  • Best score: 8
  • Best player score: 11
  • Position: #148 / 201
  • Number of attempts: 1
SFD-ROC: vimvimvim - 1643 entries

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

  • Best score: 8
  • Best player score: 15
  • Position: #416 / 458
  • Number of attempts: 1
Saving the hashes(#) - 2116 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: 38
  • Position: #454 / 488
  • Number of attempts: 1
you're stuck on jQuery < 1.7 - 401 entries

replace calls to jQuery 1.7+'s `on` with calls to pre 1.7 `bind`

  • Best score: 25
  • Best player score: 31
  • Position: #76 / 116
  • Number of attempts: 1
Enharmonic Equivalents - 74 entries

Transform # and b to digraphs

  • Best score: 18
  • Best player score: 19
  • Position: #28 / 41
  • Number of attempts: 1
Vertical Limit - 2641 entries

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

  • Best score: 21
  • Best player score: 27
  • Position: #557 / 780
  • Number of attempts: 2
Switch function arguments - 2237 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 16
  • Position: #626 / 687
  • Number of attempts: 1
Remove noise from HTTP log - 760 entries

This piece of log (from the year 2000) contains some irrelevant data. We only want to see the HTTP method and resource.

  • Best score: 15
  • Best player score: 15
  • Position: #95 / 282
  • Number of attempts: 4
Make it more readable - 2041 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 18
  • Position: #535 / 659
  • Number of attempts: 1
expand a list comprehension (python) - 348 entries

Please show your way to convert a list comprehension in python to an ordinary for-loop expression!

  • Best score: 42
  • Best player score: 52
  • Position: #52 / 111
  • Number of attempts: 1
Assignment Alignment - 909 entries

line up the operators. Use spaces, not tabs.

  • Best score: 18
  • Best player score: 30
  • Position: #173 / 226
  • Number of attempts: 2
Shebangs for all - 2105 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: 16
  • Position: #332 / 534
  • Number of attempts: 2
Ruby 1.9 compat - 668 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: 19
  • Position: #204 / 243
  • Number of attempts: 1
Reformat some Python - 659 entries

Fix some very bizarrely laid-out code.

  • Best score: 34
  • Best player score: 38
  • Position: #83 / 248
  • Number of attempts: 3
Reverse characters in a line - 847 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 / 284
  • Number of attempts: 2
Get rid of html tags - 465 entries

Want to read more about Vim's background? Then get rid of those html tags...

  • Best score: 12
  • Best player score: 17
  • Position: #118 / 262
  • Number of attempts: 1
Sort and add attributes - 1601 entries

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

  • Best score: 33
  • Best player score: 35
  • Position: #444 / 619
  • Number of attempts: 4

Contributed Challenges

Wget failed to download redirections - 250 entries

Output of a wget session, where 302 where not properly handled due to certificate problems, has been saved to a file. Keep the correct URLs to start again downloading.

r.
Twitter:

Software Minimalist

entered into 43 challenges

contributed 1 challenges