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

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

  • Best score: 5
  • Best player score: 5
  • Position: #194 / 406
  • Number of attempts: 1
Search and Replace 0 - 4976 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #292 / 1620
  • Number of attempts: 4
Swap assigned value - 643 entries

Simple problem but looking for interesting solutions.

  • Best score: 10
  • Best player score: 10
  • Position: #60 / 253
  • Number of attempts: 2
A HAPPY NEW YEAR 2014 ! - 10657 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Position: #168 / 3679
  • Number of attempts: 3
attr_aligner - 3498 entries

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

  • Best score: 19
  • Best player score: 26
  • Position: #259 / 696
  • Number of attempts: 4
Words in parens - 12928 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #298 / 3960
  • Number of attempts: 4
fib.c cleanup - 68 entries

cleanup the file

  • Best score: 15
  • Best player score: 16
  • Position: #35 / 55
  • Number of attempts: 1
Prefixes and suffixes - 629 entries

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

  • Best score: 17
  • Best player score: 17
  • Position: #10 / 196
  • Number of attempts: 5
abcd > a b c d - 290 entries

transform the single spaces into 4 spaces repeat for each line

  • Best score: 15
  • Best player score: 15
  • Position: #123 / 221
  • Number of attempts: 1
NATO phonetic alphabet - 526 entries

Transform the series of words into a list.

  • Best score: 19
  • Best player score: 19
  • Position: #17 / 195
  • Number of attempts: 3
A simple change - 461 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #20 / 191
  • Number of attempts: 2
SFD-ROC: The Quick Brown Fox - 193 entries

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

  • Best score: 24
  • Best player score: 25
  • Position: #11 / 106
  • Number of attempts: 2
Let's play some Ivmgolf - 1118 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 7
  • Position: #58 / 445
  • Number of attempts: 2
Vertical Limit - 2538 entries

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

  • Best score: 21
  • Best player score: 21
  • Position: #22 / 754
  • Number of attempts: 5
Make the circuit grid! - 101 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
  • Position: #20 / 50
  • Number of attempts: 2
replacing each line of a block selection - 2998 entries

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

  • Best score: 18
  • Best player score: 18
  • Position: #58 / 776
  • Number of attempts: 6
Append semicolon after expressions - 1047 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 11
  • Position: #65 / 414
  • Number of attempts: 3
Remove semicolons after expressions - 654 entries

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

  • Best score: 6
  • Best player score: 6
  • Position: #70 / 263
  • Number of attempts: 2
switch variable - 5068 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 11
  • Position: #264 / 1747
  • Number of attempts: 3
The meaning - 574 entries

Numbers are fun!

  • Best score: 5
  • Best player score: 5
  • Position: #217 / 362
  • Number of attempts: 1
Sort the cardinal numbers - 310 entries

Maybe a simple challenge.

  • Best score: 12
  • Best player score: 12
  • Position: #37 / 148
  • Number of attempts: 3
Make it more readable - 1988 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 13
  • Position: #51 / 647
  • Number of attempts: 4
PHP Array Syntax -> MailChimp Merge Syntax - 545 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
  • Position: #93 / 150
  • Number of attempts: 3
Insert a Markdown link - 434 entries

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

  • Best score: 22
  • Best player score: 23
  • Position: #36 / 145
  • Number of attempts: 4
Ruby 1.9 hashes - 1239 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: #60 / 405
  • Number of attempts: 6
A Simple One - 1045 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
  • Position: #366 / 660
  • Number of attempts: 1
Ruby 1.9 compat - 627 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
  • Position: #46 / 233
  • Number of attempts: 5
Reverse Simple Deletion - 847 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 11
  • Position: #17 / 458
  • Number of attempts: 2
Increment, increment, increment.... - 677 entries

Vim likes macros

  • Best score: 10
  • Best player score: 12
  • Position: #275 / 405
  • Number of attempts: 1
Indentation - 534 entries

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

  • Best score: 20
  • Best player score: 23
  • Position: #30 / 177
  • Number of attempts: 5
Context Insensitive completion 1 - 494 entries

Finish writing this simple Python HTTP server.

  • Best score: 18
  • Best player score: 18
  • Position: #114 / 243
  • Number of attempts: 2
Make Fancy Header - 1046 entries

Make the header text stand out with surrounding asterisks

  • Best score: 15
  • Best player score: 16
  • Position: #84 / 343
  • Number of attempts: 3
Reformat some Python - 604 entries

Fix some very bizarrely laid-out code.

  • Best score: 34
  • Best player score: 44
  • Position: #136 / 235
  • Number of attempts: 3
Sort and add attributes - 1431 entries

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

  • Best score: 33
  • Best player score: 33
  • Position: #173 / 556
  • Number of attempts: 3
Xelrifos
Twitter:

entered into 34 challenges

contributed 0 challenges