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

Wrap the text of an email message to 79 characters - 799 entries

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

  • Best score: 5
  • Best player score: 5
  • Position: #102 / 421
  • Number of attempts: 1
Search and Replace 0 - 5004 entries

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

  • Best score: 12
  • Best player score: 16
  • Position: #1159 / 1630
  • Number of attempts: 2
Python Hello World! Reformatting - 1000 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: 43
  • Position: #153 / 382
  • Number of attempts: 2
replacing each line of a block selection - 3001 entries

replace each line's ../assets/js with /javascripts

  • Best score: 18
  • Best player score: 27
  • Position: #561 / 778
  • Number of attempts: 2
switch variable - 5079 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 14
  • Position: #1284 / 1749
  • 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: 19
  • Position: #549 / 652
  • Number of attempts: 4
Case preserving word replacement - 454 entries

Half way through my project, my people turned into dogs. Now I have to change everything in my source.

  • Best score: 19
  • Best player score: 23
  • Position: #143 / 180
  • Number of attempts: 2
HTML to Haml - 881 entries

Help convert this HTML page to Haml.

  • Best score: 23
  • Best player score: 40
  • Position: #114 / 205
  • Number of attempts: 2
Numbering a List - 1935 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 25
  • Position: #515 / 654
  • Number of attempts: 1
Ruby 1.9 hashes - 1249 entries

Rubyists talk about being cutting edge but how many are using 1.9 in production? Time to convert those verbose 1.8 hashes in to symbolic, succinct 1.9 beauties!

  • Best score: 12
  • Best player score: 22
  • Position: #387 / 407
  • Number of attempts: 1
Assignment Alignment - 885 entries

line up the operators. Use spaces, not tabs.

  • Best score: 18
  • Best player score: 36
  • Position: #200 / 221
  • Number of attempts: 1
Shebangs for all - 2016 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: 24
  • Position: #465 / 518
  • Number of attempts: 1
A Simple One - 1057 entries

Here is a very simple one - just to illustrate/introduce a vim feature that some people seem to miss...

  • Best score: 9
  • Best player score: 9
  • Position: #256 / 667
  • Number of attempts: 1
Ruby 1.9 compat - 634 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: #195 / 235
  • Number of attempts: 2
Reverse Simple Deletion - 854 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 12
  • Position: #223 / 460
  • Number of attempts: 1
Increment, increment, increment.... - 692 entries

Vim likes macros

  • Best score: 10
  • Best player score: 12
  • Position: #227 / 410
  • Number of attempts: 1
Indentation - 550 entries

Indent each line according to the right number of spaces it needs.

  • Best score: 20
  • Best player score: 27
  • Position: #81 / 180
  • Number of attempts: 3
The Cake is a Lie - 1361 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 10
  • Position: #336 / 531
  • Number of attempts: 3
Make Fancy Header - 1059 entries

Make the header text stand out with surrounding asterisks

  • Best score: 15
  • Best player score: 17
  • Position: #172 / 345
  • Number of attempts: 3
Reformat some Python - 622 entries

Fix some very bizarrely laid-out code.

  • Best score: 34
  • Best player score: 41
  • Position: #110 / 238
  • Number of attempts: 1
Reverse characters in a line - 776 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: 16
  • Position: #154 / 267
  • Number of attempts: 1
Get rid of html tags - 407 entries

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

  • Best score: 12
  • Best player score: 17
  • Position: #71 / 236
  • Number of attempts: 1
Change the content of a string - 1591 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 23
  • Position: #266 / 593
  • Number of attempts: 2
Sort and add attributes - 1477 entries

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

  • Best score: 33
  • Best player score: 35
  • Position: #404 / 575
  • Number of attempts: 1
Reconstruct the Sentence - 1589 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: 23
  • Position: #291 / 425
  • Number of attempts: 3
Whitespace, empty lines and tabs - 3742 entries

Convert tabs to spaces, strip empty lines and trailing whitespace.

  • Best score: 16
  • Best player score: 28
  • Position: #483 / 803
  • Number of attempts: 2
Flodder-challenge - 1325 entries

Replace the text the most efficient and win!

  • Best score: 27
  • Best player score: 35
  • Position: #149 / 346
  • Number of attempts: 1
Simple text editing with Vim - 12971 entries

Make the pairs of lines match up by making each second line same as first

  • Best score: 13
  • Best player score: 17
  • Position: #2379 / 3733
  • Number of attempts: 2
Reformat/Refactor a Golfer Class - 7150 entries

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

  • Best score: 28
  • Best player score: 41
  • Position: #878 / 1753
  • Number of attempts: 5
Jyun-Fan Tsai
Twitter:

entered into 29 challenges

contributed 0 challenges