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

replacing each line of a block selection - 2682 entries

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

  • Best score: 18
  • Best player score: 31
  • Number of attempts: 1
Reverse and count - 382 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
The name of the game - 594 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 17
  • Number of attempts: 1
Numbering a List - 1760 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 30
  • Number of attempts: 3
Saving the hashes(#) - 1861 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
The meaning - 508 entries

Numbers are fun!

  • Best score: 5
  • Best player score: 5
  • Number of attempts: 1
Sort and add attributes - 1112 entries

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

  • Best score: 33
  • Best player score: 34
  • Number of attempts: 2
Indentation - 418 entries

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

  • Best score: 21
  • Best player score: 37
  • Number of attempts: 1
SFD-ROC: vimvimvim - 1348 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
imports alignment (python) - 583 entries

Align as one import per line.

  • Best score: 17
  • Best player score: 46
  • Number of attempts: 1
Make Fancy Header - 928 entries

Make the header text stand out with surrounding asterisks

  • Best score: 16
  • Best player score: 31
  • Number of attempts: 1
Context insensitive completion 0 - 453 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
Stairs Indenting - 384 entries

Indent each line with <line number> whitespaces.

  • Best score: 12
  • Best player score: 25
  • Number of attempts: 2
Vertical Limit - 2230 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
NATO phonetic alphabet - 410 entries

Transform the series of words into a list.

  • Best score: 19
  • Best player score: 28
  • Number of attempts: 3
The Quick Brown Fox Jumps Over The Lazy Vim - 338 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
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
Wrap the text of an email message to 79 characters - 512 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
Remove noise from HTTP log - 622 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
Reverse and double space - 423 entries

Reverse the order of the given lines and double space everything

  • Best score: 14
  • Best player score: 17
  • Number of attempts: 2
Words in parens - 11996 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 25
  • Number of attempts: 1
Whitespace, empty lines and tabs - 2715 entries

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

  • Best score: 16
  • Best player score: 30
  • Number of attempts: 3
Make it more readable - 1797 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 29
  • Number of attempts: 1
Simple text editing with Vim - 11020 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
Search and Replace 0 - 4434 entries

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

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

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 15
  • Number of attempts: 3
Context Insensitive completion 1 - 397 entries

Finish writing this simple Python HTTP server.

  • Best score: 18
  • Best player score: 19
  • Number of attempts: 4
Sort the cardinal numbers - 226 entries

Maybe a simple challenge.

  • Best score: 12
  • Best player score: 14
  • Number of attempts: 1
Change the content of a string - 1266 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 27
  • Number of attempts: 1
Shebangs for all - 1666 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
Nicolas Friedli
Twitter:

entered into 30 challenges

contributed 0 challenges