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

A HAPPY NEW YEAR 2014 ! - 10391 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 2
attr_aligner - 3282 entries

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

  • Best score: 19
  • Best player score: 19
  • Number of attempts: 12
quotes inside quotes - 2973 entries

taken from tip 85 of the very good book 'Practical Vim: Edit Text at the Speed of Thought' ! I'd be interested what people use :)

  • Best score: 14
  • Best player score: 14
  • Number of attempts: 4
Words in parens - 12439 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 14
  • Number of attempts: 7
Let's play some Ivmgolf - 976 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 7
  • Number of attempts: 4
Dehamlizing - 156 entries

Change this piece of HAML code back into erb

  • Best score: 32
  • Best player score: 68
  • Number of attempts: 1
Make the circuit grid! - 72 entries

Copy this command for a circuit layout program to create 10 total smd commands. Increment the number in quotes to name each pad, and add 0.7 to each of the (X Y) coordinates at the end of each line.

  • Best score: 26
  • Best player score: 33
  • Number of attempts: 1
Vertical Limit - 2264 entries

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

  • Best score: 21
  • Best player score: 22
  • Number of attempts: 7
Switch function arguments - 1899 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 8
Remove noise from HTTP log - 631 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
  • Number of attempts: 3
Exchanging Quotes - 779 entries

Sometimes you need to exchange a choice of quotes in some code.

  • Best score: 30
  • Best player score: 34
  • Number of attempts: 12
Reverse and double space - 424 entries

Reverse the order of the given lines and double space everything

  • Best score: 14
  • Best player score: 14
  • Number of attempts: 5
The meaning - 515 entries

Numbers are fun!

  • Best score: 5
  • Best player score: 5
  • Number of attempts: 2
replacing each line of a block selection - 2706 entries

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

  • Best score: 18
  • Best player score: 30
  • Number of attempts: 2
Sort entries based on date - 315 entries

Sort some entries in a Ledger-file based on date.

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 11
Alphabetize the directory - 261 entries

Put the contacts and their information in alphabetical order.

  • Best score: 30
  • Best player score: 38
  • Number of attempts: 7
Ruby 1.9 hashes - 1113 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: 12
  • Number of attempts: 4
Reverse and count - 384 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: 32
  • Number of attempts: 3
Hatsuyume - 368 entries

http://en.wikipedia.org/wiki/Hatsuyume

  • Best score: 16
  • Best player score: 29
  • Number of attempts: 3
Context insensitive completion 0 - 461 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: 7
  • Number of attempts: 3
Python Hello World! Reformatting - 859 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: 44
  • Number of attempts: 2
Search and Replace 0 - 4479 entries

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

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 4
Change the content of a string - 1270 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 22
  • Number of attempts: 8
Wrap the text of an email message to 79 characters - 521 entries

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

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

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

  • Best score: 33
  • Best player score: 33
  • Number of attempts: 2
Braces or Brackets? - 644 entries

Someone forgot whether to use braces or brackets and you have to clean up their code!

  • Best score: 34
  • Best player score: 56
  • Number of attempts: 1
Flodder-challenge - 829 entries

Replace the text the most efficient and win!

  • Best score: 27
  • Best player score: 37
  • Number of attempts: 2
Whitespace, empty lines and tabs - 2733 entries

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

  • Best score: 16
  • Best player score: 17
  • Number of attempts: 11
Simple text editing with Vim - 11231 entries

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

  • Best score: 13
  • Best player score: 14
  • Number of attempts: 6
Reformat/Refactor a Golfer Class - 5742 entries

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

  • Best score: 32
  • Best player score: 32
  • Number of attempts: 12
Son of Bongo
Twitter:

entered into 30 challenges

contributed 0 challenges