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 - 576 entries

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

  • Best score: 5
  • Best player score: 5
  • Position: #129 / 352
  • Number of attempts: 1
Search and Replace 0 - 4654 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #163 / 1542
  • Number of attempts: 4
Python Hello World! Reformatting - 897 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
  • Position: #210 / 350
  • Number of attempts: 2
A HAPPY NEW YEAR 2014 ! - 10533 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 12
  • Position: #1589 / 3637
  • Number of attempts: 2
attr_aligner - 3402 entries

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

  • Best score: 19
  • Best player score: 19
  • Position: #37 / 685
  • Number of attempts: 12
quotes inside quotes - 3026 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
  • Position: #85 / 1044
  • Number of attempts: 4
Words in parens - 12736 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #205 / 3919
  • Number of attempts: 7
Dehamlizing - 174 entries

Change this piece of HAML code back into erb

  • Best score: 32
  • Best player score: 68
  • Position: #65 / 67
  • Number of attempts: 1
Let's play some Ivmgolf - 1005 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 7
  • Position: #54 / 418
  • Number of attempts: 4
Vertical Limit - 2367 entries

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

  • Best score: 21
  • Best player score: 22
  • Position: #124 / 716
  • Number of attempts: 7
Make the circuit grid! - 77 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
  • Position: #38 / 44
  • Number of attempts: 1
Exchanging Quotes - 791 entries

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

  • Best score: 30
  • Best player score: 34
  • Position: #72 / 218
  • Number of attempts: 12
replacing each line of a block selection - 2791 entries

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

  • Best score: 18
  • Best player score: 30
  • Position: #612 / 732
  • Number of attempts: 2
Switch function arguments - 1982 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 11
  • Position: #40 / 627
  • Number of attempts: 8
Reverse and double space - 445 entries

Reverse the order of the given lines and double space everything

  • Best score: 14
  • Best player score: 14
  • Position: #11 / 183
  • Number of attempts: 5
Remove noise from HTTP log - 660 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
  • Position: #46 / 260
  • Number of attempts: 3
The meaning - 521 entries

Numbers are fun!

  • Best score: 5
  • Best player score: 5
  • Position: #144 / 336
  • Number of attempts: 2
Alphabetize the directory - 269 entries

Put the contacts and their information in alphabetical order.

  • Best score: 30
  • Best player score: 38
  • Position: #61 / 97
  • Number of attempts: 7
Sort entries based on date - 339 entries

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

  • Best score: 11
  • Best player score: 11
  • Position: #30 / 110
  • Number of attempts: 11
Ruby 1.9 hashes - 1157 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
  • Position: #39 / 382
  • Number of attempts: 4
Reverse and count - 412 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
  • Position: #118 / 158
  • Number of attempts: 3
Hatsuyume - 413 entries

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

  • Best score: 16
  • Best player score: 29
  • Position: #108 / 166
  • Number of attempts: 3
Context insensitive completion 0 - 470 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: 7
  • Best player score: 7
  • Position: #68 / 222
  • Number of attempts: 3
Change the content of a string - 1350 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 22
  • Position: #81 / 521
  • Number of attempts: 8
Sort and add attributes - 1191 entries

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

  • Best score: 33
  • Best player score: 33
  • Position: #101 / 484
  • Number of attempts: 2
Braces or Brackets? - 710 entries

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

  • Best score: 34
  • Best player score: 56
  • Position: #225 / 253
  • Number of attempts: 1
Whitespace, empty lines and tabs - 2980 entries

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

  • Best score: 16
  • Best player score: 17
  • Position: #36 / 664
  • Number of attempts: 11
Flodder-challenge - 901 entries

Replace the text the most efficient and win!

  • Best score: 27
  • Best player score: 37
  • Position: #159 / 270
  • Number of attempts: 2
Simple text editing with Vim - 11637 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #902 / 3413
  • Number of attempts: 6
Reformat/Refactor a Golfer Class - 6015 entries

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

  • Best score: 32
  • Best player score: 32
  • Position: #11 / 1482
  • Number of attempts: 12
Son of Bongo
Twitter:

entered into 30 challenges

contributed 0 challenges