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 - 202 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: #53 / 65
  • Number of attempts: 2
V to the i - 4802 entries

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

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

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

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

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

  • Best score: 12
  • Best player score: 15
  • Position: #1116 / 1624
  • Number of attempts: 1
That hyphen - 2595 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 11
  • Position: #307 / 701
  • Number of attempts: 2
Just the middle - 11454 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 9
  • Position: #3219 / 4197
  • Number of attempts: 2
Python Hello World! Reformatting - 994 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: #121 / 380
  • Number of attempts: 2
Basic renumbering - 5648 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 24
  • Position: #1087 / 1264
  • Number of attempts: 1
Refactoring useless Method away - 116 entries

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

  • Best score: 47
  • Best player score: 56
  • Position: #15 / 34
  • Number of attempts: 2
Test everything! - 186 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: #34 / 54
  • Number of attempts: 2
Condensed Cases - 804 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: #181 / 247
  • Number of attempts: 2
I forgot quotes - 15983 entries

Oops.

  • Best score: 10
  • Best player score: 16
  • Position: #2407 / 4180
  • Number of attempts: 2
learn vim in short time - 240 entries

so happy to learn vim.because vim is awesome

  • Best score: 8
  • Best player score: 9
  • Position: #141 / 161
  • Number of attempts: 1
Replace Parameter with Explicit Methods - 76 entries

Implementing the methods of a Java Interface

  • Best score: 33
  • Best player score: 41
  • Position: #14 / 27
  • Number of attempts: 4
-a-b-c- - 3213 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 15
  • Position: #514 / 1137
  • Number of attempts: 2
Change name of a variable - 179 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 / 137
  • Number of attempts: 2
Gray area - 747 entries

It's a golf metaphor or something.

  • Best score: 11
  • Best player score: 13
  • Position: #161 / 271
  • 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 - 112 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: #30 / 35
  • Number of attempts: 1
Where should I put the Newline? - 881 entries

Help me put the newline.

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

We should all ace this, right?

  • Best score: 13
  • Best player score: 16
  • Position: #2182 / 3963
  • Number of attempts: 1
Hole-in-one - 1018 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 / 304
  • Number of attempts: 2
Delete unwanted lines - 411 entries

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

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

Enumerate the unique words in order.

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

transform the single spaces into 4 spaces repeat for each line

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

Transform the series of words into a list.

  • Best score: 19
  • Best player score: 25
  • Position: #164 / 196
  • Number of attempts: 2
The Quick Brown Fox Jumps Over The Lazy Vim - 420 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: #142 / 192
  • Number of attempts: 1
SFD-ROC: vimvimvim - 1606 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: #409 / 446
  • Number of attempts: 1
Saving the hashes(#) - 2063 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: #447 / 480
  • Number of attempts: 1
you're stuck on jQuery < 1.7 - 362 entries

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

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

Transform # and b to digraphs

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

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

  • Best score: 21
  • Best player score: 27
  • Position: #541 / 754
  • Number of attempts: 2
Switch function arguments - 2139 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 16
  • Position: #605 / 663
  • Number of attempts: 1
Remove noise from HTTP log - 717 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 / 273
  • Number of attempts: 4
Make it more readable - 2005 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 18
  • Position: #528 / 650
  • Number of attempts: 1
expand a list comprehension (python) - 333 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: #51 / 109
  • Number of attempts: 1
Assignment Alignment - 883 entries

line up the operators. Use spaces, not tabs.

  • Best score: 18
  • Best player score: 30
  • Position: #170 / 220
  • Number of attempts: 2
Shebangs for all - 1999 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: #321 / 516
  • Number of attempts: 2
Ruby 1.9 compat - 629 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: #196 / 234
  • Number of attempts: 1
Reformat some Python - 609 entries

Fix some very bizarrely laid-out code.

  • Best score: 34
  • Best player score: 38
  • Position: #77 / 236
  • Number of attempts: 3
Reverse characters in a line - 771 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: #141 / 265
  • Number of attempts: 2
Get rid of html tags - 398 entries

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

  • Best score: 12
  • Best player score: 17
  • Position: #107 / 230
  • Number of attempts: 1
Sort and add attributes - 1451 entries

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

  • Best score: 33
  • Best player score: 35
  • Position: #405 / 563
  • Number of attempts: 4

Contributed Challenges

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