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

Whitespace, empty lines and tabs - 2529 entries

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

  • Best score: 16
  • Best player score: 64
  • Number of attempts: 1
attr_aligner - 2957 entries

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

  • Best score: 19
  • Best player score: 56
  • Number of attempts: 1
Reformat/Refactor a Golfer Class - 5464 entries

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

  • Best score: 32
  • Best player score: 47
  • Number of attempts: 1
replacing each line of a block selection - 2478 entries

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

  • Best score: 17
  • Best player score: 44
  • Number of attempts: 1
Saving the hashes(#) - 1709 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: 44
  • Number of attempts: 1
Sort and add attributes - 1067 entries

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

  • Best score: 18
  • Best player score: 43
  • Number of attempts: 2
Simple, Practical, and Common - 24063 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: 2
  • Best player score: 33
  • Number of attempts: 1
Vertical Limit - 2099 entries

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

  • Best score: 21
  • Best player score: 32
  • Number of attempts: 1
I forgot quotes - 11389 entries

Oops.

  • Best score: 10
  • Best player score: 16
  • Number of attempts: 1
Reconstruct the Sentence - 1016 entries

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

  • Best score: 20
  • Best player score: 26
  • Number of attempts: 2
switch variable - 4251 entries

how fast can you switch two variable ?

  • Best score: 3
  • Best player score: 16
  • Number of attempts: 1
V to the i - 3801 entries

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

  • Best score: 7
  • Best player score: 9
  • Number of attempts: 1
Append semicolon after expressions - 844 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 15
  • Number of attempts: 3
The name of the game - 579 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 14
  • Number of attempts: 1
The meaning - 495 entries

Numbers are fun!

  • Best score: 5
  • Best player score: 6
  • Number of attempts: 1
Just the middle - 8983 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 11
  • Number of attempts: 1
Words in parens - 10855 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 17
  • Number of attempts: 1
Let's play some Ivmgolf - 891 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 31
  • Number of attempts: 1
The Cake is a Lie - 1111 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 12
  • Number of attempts: 1
Simple text editing with Vim - 10282 entries

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

  • Best score: 13
  • Best player score: 19
  • Number of attempts: 1
A HAPPY NEW YEAR 2014 ! - 9382 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 14
  • Number of attempts: 1
Switch function arguments - 1815 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 17
  • Number of attempts: 2
Letter case trickery - 1426 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: 19
  • Number of attempts: 1
Going underground.... - 283 entries

Simple reformatting: in this case changing from the format London underground supplies its customers with, to the format that Google Calendar likes...

  • Best score: 22
  • Best player score: 61
  • Number of attempts: 1
The holy-grail may help - 298 entries

Can you find it in less than 20 strokes, Arthur?

  • Best score: 16
  • Best player score: 20
  • Number of attempts: 2
Shebangs for all - 1574 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: 23
  • Number of attempts: 2
you're stuck on jQuery < 1.7 - 317 entries

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

  • Best score: 25
  • Best player score: 39
  • Number of attempts: 1
Remove noise from HTTP log - 599 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: 17
  • Number of attempts: 2
SFD-ROC: vimvimvim - 1265 entries

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

  • Best score: 8
  • Best player score: 23
  • Number of attempts: 2
Swap assigned value - 490 entries

Simple problem but looking for interesting solutions.

  • Best score: 10
  • Best player score: 24
  • Number of attempts: 1
Change the content of a string - 1222 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 27
  • Number of attempts: 1
Delete unwanted lines - 333 entries

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

  • Best score: 9
  • Best player score: 9
  • Number of attempts: 1
It'ss tooo coold too typpe todaay - 194 entries

My hands are numb with cold. It's hard to type correctly.

  • Best score: 16
  • Best player score: 29
  • Number of attempts: 2
wilddog64
Twitter:

entered into 33 challenges

contributed 0 challenges