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

PHP Array Syntax -> MailChimp Merge Syntax - 434 entries

I recently needed to send an e-mail to our marketing department listing allowed merge tags for our MailChimp campaigns. The allowed merge tags were determined from a PHP array in one of our PHP classes. I transformed the PHP class to MailChimp's syntax and sent the e-mail. It was, however, a long, laborious process. I'm still fairly new to Vim and would love to see how an expert Vim user would tackle one of my own, real-world problems. Thanks and have fun!

  • Best score: 23
  • Best player score: 34
  • Number of attempts: 3
Sort and add attributes - 1105 entries

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

  • Best score: 33
  • Best player score: 33
  • Number of attempts: 3
attr_aligner - 3106 entries

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

  • Best score: 19
  • Best player score: 26
  • Number of attempts: 4
SFD-ROC: The Quick Brown Fox - 140 entries

Someone has vandalized our text (again). Please fix to read: The Quick Brown Fox Jumps Over The Lazy Dog.

  • Best score: 25
  • Best player score: 25
  • Number of attempts: 2
Indentation - 416 entries

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

  • Best score: 21
  • Best player score: 23
  • Number of attempts: 5
Reformat some Python - 514 entries

Fix some very bizarrely laid-out code.

  • Best score: 34
  • Best player score: 44
  • Number of attempts: 3
Vertical Limit - 2189 entries

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

  • Best score: 21
  • Best player score: 21
  • Number of attempts: 5
NATO phonetic alphabet - 408 entries

Transform the series of words into a list.

  • Best score: 19
  • Best player score: 19
  • Number of attempts: 3
replacing each line of a block selection - 2614 entries

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

  • Best score: 18
  • Best player score: 18
  • Number of attempts: 6
Context Insensitive completion 1 - 397 entries

Finish writing this simple Python HTTP server.

  • Best score: 18
  • Best player score: 18
  • Number of attempts: 2
Make the circuit grid! - 71 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: 26
  • Number of attempts: 2
switch variable - 4478 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 3
Reverse Simple Deletion - 727 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 2
Swap assigned value - 502 entries

Simple problem but looking for interesting solutions.

  • Best score: 10
  • Best player score: 10
  • Number of attempts: 2
A HAPPY NEW YEAR 2014 ! - 9844 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 3
Search and Replace 0 - 4275 entries

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

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 4
Insert a Markdown link - 389 entries

Put a link in a markdown document, using the after-the-paragraph format.

  • Best score: 22
  • Best player score: 23
  • Number of attempts: 4
Let's play some Ivmgolf - 950 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 7
  • Number of attempts: 2
The meaning - 506 entries

Numbers are fun!

  • Best score: 5
  • Best player score: 5
  • Number of attempts: 1
Remove semicolons after expressions - 467 entries

A follow-up for http://vimgolf.com/challenges/4fc9d767d3a0d4000100000e.

  • Best score: 6
  • Best player score: 6
  • Number of attempts: 2
Ruby 1.9 hashes - 1095 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: 6
Wrap the text of an email message to 79 characters - 500 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
A simple change - 366 entries

Just change the numbers in the most efficient way ...

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 2
Increment, increment, increment.... - 498 entries

Vim likes macros

  • Best score: 10
  • Best player score: 12
  • Number of attempts: 1
A Simple One - 852 entries

Here is a very simple one - just to illustrate/introduce a vim feature that some people seem to miss...

  • Best score: 9
  • Best player score: 9
  • Number of attempts: 1
Words in parens - 11577 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 14
  • Number of attempts: 4
Sort the cardinal numbers - 222 entries

Maybe a simple challenge.

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 3
Make Fancy Header - 928 entries

Make the header text stand out with surrounding asterisks

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

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 13
  • Number of attempts: 4
abcd > a b c d - 243 entries

transform the single spaces into 4 spaces repeat for each line

  • Best score: 15
  • Best player score: 15
  • Number of attempts: 1
Ruby 1.9 compat - 558 entries

Remember when Ruby supported `when <expr> :`? Well, it doesn't in 1.9, so let's make sure we use `then`, without ruining our lovely new hash syntax!

  • Best score: 14
  • Best player score: 14
  • Number of attempts: 5
fib.c cleanup - 56 entries

cleanup the file

  • Best score: 15
  • Best player score: 16
  • Number of attempts: 1
Append semicolon after expressions - 887 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 3
Prefixes and suffixes - 510 entries

Generate all prefixes of "vimchallenge", then all suffixes.

  • Best score: 17
  • Best player score: 17
  • Number of attempts: 5
Xelrifos
Twitter:

entered into 34 challenges

contributed 0 challenges