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

Indentation - 416 entries

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

  • Best score: 21
  • Best player score: 37
  • Number of attempts: 1
Sort and add attributes - 1101 entries

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

  • Best score: 33
  • Best player score: 34
  • Number of attempts: 2
PEP8 Python Wrapping Comments and Code - 155 entries

According to PEP8, long flowy text and code should have different max line lengths. Code: 79 characters max Long flowy text: 72 characters max

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

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

  • Best score: 18
  • Best player score: 31
  • Number of attempts: 1
imports alignment (python) - 577 entries

Align as one import per line.

  • Best score: 17
  • Best player score: 46
  • Number of attempts: 1
Reverse and count - 379 entries

Someone typed things upside down and now a Vim ninja needs to reverse the lines and count how many there are.

  • Best score: 18
  • Best player score: 36
  • Number of attempts: 2
Numbering a List - 1754 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 30
  • Number of attempts: 3
The name of the game - 588 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 17
  • Number of attempts: 1
NATO phonetic alphabet - 407 entries

Transform the series of words into a list.

  • Best score: 19
  • Best player score: 28
  • Number of attempts: 3
Make Fancy Header - 923 entries

Make the header text stand out with surrounding asterisks

  • Best score: 16
  • Best player score: 31
  • Number of attempts: 1
Reverse and double space - 411 entries

Reverse the order of the given lines and double space everything

  • Best score: 14
  • Best player score: 17
  • Number of attempts: 2
Vertical Limit - 2168 entries

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

  • Best score: 21
  • Best player score: 29
  • Number of attempts: 4
Change the content of a string - 1257 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 27
  • Number of attempts: 1
Search and Replace 0 - 4226 entries

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

  • Best score: 12
  • Best player score: 15
  • Number of attempts: 1
Switch function arguments - 1857 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 15
  • Number of attempts: 3
Wrap the text of an email message to 79 characters - 495 entries

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

  • Best score: 5
  • Best player score: 5
  • Number of attempts: 3
Sort the cardinal numbers - 221 entries

Maybe a simple challenge.

  • Best score: 12
  • Best player score: 14
  • Number of attempts: 1
The meaning - 504 entries

Numbers are fun!

  • Best score: 5
  • Best player score: 5
  • Number of attempts: 1
Context Insensitive completion 1 - 395 entries

Finish writing this simple Python HTTP server.

  • Best score: 18
  • Best player score: 19
  • Number of attempts: 4
Context insensitive completion 0 - 445 entries

Buried in the lines you're not supposed to add is the line "Add this line!" Add that line to the top of the file.

  • Best score: 6
  • Best player score: 9
  • Number of attempts: 1
Shebangs for all - 1643 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: 21
  • Number of attempts: 3
The Quick Brown Fox Jumps Over The Lazy Vim - 330 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: 10
  • Best player score: 12
  • Number of attempts: 2
Simple text editing with Vim - 10703 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: 7
SFD-ROC: vimvimvim - 1325 entries

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

  • Best score: 8
  • Best player score: 17
  • Number of attempts: 2
Remove noise from HTTP log - 620 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: 24
  • Number of attempts: 2
Stairs Indenting - 360 entries

Indent each line with <line number> whitespaces.

  • Best score: 12
  • Best player score: 25
  • Number of attempts: 2
Words in parens - 11443 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 25
  • Number of attempts: 1
Saving the hashes(#) - 1806 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: 29
  • Number of attempts: 2
Make it more readable - 1775 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 29
  • Number of attempts: 1
Whitespace, empty lines and tabs - 2603 entries

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

  • Best score: 16
  • Best player score: 30
  • Number of attempts: 3
Nicolas Friedli
Twitter:

entered into 30 challenges

contributed 0 challenges