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 - 185 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: #52 / 64
  • Number of attempts: 2
V to the i - 4771 entries

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

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

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

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

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

  • Best score: 12
  • Best player score: 15
  • Position: #1099 / 1605
  • Number of attempts: 1
That hyphen - 2572 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 11
  • Position: #306 / 698
  • Number of attempts: 2
Just the middle - 11380 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 9
  • Position: #3203 / 4174
  • Number of attempts: 2
Python Hello World! Reformatting - 955 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: #117 / 371
  • Number of attempts: 2
Basic renumbering - 5605 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 24
  • Position: #1083 / 1260
  • Number of attempts: 1
Refactoring useless Method away - 92 entries

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

  • Best score: 47
  • Best player score: 56
  • Position: #14 / 33
  • Number of attempts: 2
Test everything! - 163 entries

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

  • Best score: 22
  • Best player score: 33
  • Position: #33 / 53
  • Number of attempts: 2
Condensed Cases - 794 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: #180 / 244
  • Number of attempts: 2
I forgot quotes - 15946 entries

Oops.

  • Best score: 10
  • Best player score: 16
  • Position: #2401 / 4166
  • Number of attempts: 2
learn vim in short time - 233 entries

so happy to learn vim.because vim is awesome

  • Best score: 8
  • Best player score: 9
  • Position: #140 / 159
  • Number of attempts: 1
Replace Parameter with Explicit Methods - 62 entries

Implementing the methods of a Java Interface

  • Best score: 33
  • Best player score: 41
  • Position: #13 / 26
  • Number of attempts: 4
-a-b-c- - 3183 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 15
  • Position: #512 / 1132
  • Number of attempts: 2
Change name of a variable - 173 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 / 136
  • Number of attempts: 2
Gray area - 745 entries

It's a golf metaphor or something.

  • Best score: 11
  • Best player score: 13
  • Position: #161 / 270
  • Number of attempts: 4
Refactor static member invocation - 199 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: #37 / 64
  • Number of attempts: 3
Comparing scores - 95 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: #29 / 34
  • Number of attempts: 1
Where should I put the Newline? - 874 entries

Help me put the newline.

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

We should all ace this, right?

  • Best score: 13
  • Best player score: 16
  • Position: #2173 / 3950
  • Number of attempts: 1
Hole-in-one - 1017 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: #182 / 303
  • Number of attempts: 2
Delete unwanted lines - 398 entries

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

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

Enumerate the unique words in order.

  • Best score: 23
  • Best player score: 27
  • Position: #67 / 90
  • Number of attempts: 1
abcd > a b c d - 282 entries

transform the single spaces into 4 spaces repeat for each line

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

Transform the series of words into a list.

  • Best score: 19
  • Best player score: 25
  • Position: #162 / 194
  • Number of attempts: 2
The Quick Brown Fox Jumps Over The Lazy Vim - 404 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: #140 / 190
  • Number of attempts: 1
SFD-ROC: vimvimvim - 1594 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: #406 / 443
  • Number of attempts: 1
Saving the hashes(#) - 2008 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: #443 / 476
  • Number of attempts: 1
you're stuck on jQuery < 1.7 - 338 entries

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

  • Best score: 25
  • Best player score: 31
  • Position: #73 / 112
  • Number of attempts: 1
Enharmonic Equivalents - 57 entries

Transform # and b to digraphs

  • Best score: 18
  • Best player score: 19
  • Position: #26 / 36
  • Number of attempts: 1
Vertical Limit - 2487 entries

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

  • Best score: 21
  • Best player score: 27
  • Position: #535 / 748
  • Number of attempts: 2
Switch function arguments - 2085 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 16
  • Position: #596 / 653
  • Number of attempts: 1
Remove noise from HTTP log - 700 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 / 272
  • Number of attempts: 4
Make it more readable - 1955 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 18
  • Position: #522 / 643
  • Number of attempts: 1
expand a list comprehension (python) - 302 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: #50 / 107
  • Number of attempts: 1
Assignment Alignment - 842 entries

line up the operators. Use spaces, not tabs.

  • Best score: 18
  • Best player score: 30
  • Position: #169 / 217
  • Number of attempts: 2
Shebangs for all - 1917 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: #314 / 502
  • Number of attempts: 2
Ruby 1.9 compat - 610 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: #192 / 230
  • Number of attempts: 1
Reformat some Python - 590 entries

Fix some very bizarrely laid-out code.

  • Best score: 34
  • Best player score: 38
  • Position: #75 / 233
  • Number of attempts: 3
Reverse characters in a line - 732 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: #136 / 257
  • Number of attempts: 2
Get rid of html tags - 378 entries

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

  • Best score: 15
  • Best player score: 17
  • Position: #103 / 222
  • Number of attempts: 1
Sort and add attributes - 1369 entries

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

  • Best score: 33
  • Best player score: 35
  • Position: #389 / 542
  • Number of attempts: 4

Contributed Challenges

Wget failed to download redirections - 185 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