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

That hyphen - 2572 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 12
  • Position: #433 / 698
  • Number of attempts: 1
Just the middle - 11380 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #1831 / 4174
  • Number of attempts: 3
Python Hello World! Reformatting - 955 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: 42
  • Position: #119 / 371
  • Number of attempts: 3
Vice versa - 7865 entries

Little role switching.

  • Best score: 12
  • Best player score: 16
  • Position: #1169 / 2114
  • Number of attempts: 2
camel riding - 775 entries

add a prefix on some camelCase variables

  • Best score: 15
  • Best player score: 18
  • Position: #217 / 277
  • Number of attempts: 1
Land of the Lost - 79 entries

Enter the tabs below the lyrics

  • Best score: 25
  • Best player score: 55
  • Position: #27 / 31
  • Number of attempts: 1
readability - 315 entries

Make the code readable by adding some spaces

  • Best score: 18
  • Best player score: 20
  • Position: #137 / 150
  • Number of attempts: 1
Interleave lines - 159 entries

This is some kind of « paste -d'\n' c b a ». There are many ways to achieve this.. just find the shortest!

  • Best score: 17
  • Best player score: 26
  • Position: #25 / 59
  • Number of attempts: 4
Logging with key - 302 entries

Sometimes it is better to log with meaningful key

  • Best score: 21
  • Best player score: 29
  • Position: #50 / 87
  • Number of attempts: 8
Test everything! - 163 entries

... and build the desired input data structure. Transform a list of values into a non-trivial format.

  • Best score: 22
  • Best player score: 26
  • Position: #20 / 53
  • Number of attempts: 3
increment by column in XML - 147 entries

modify an arbitrary "column" in an xml table by incrementing a an arbitrary placeholder string

  • Best score: 19
  • Best player score: 44
  • Position: #52 / 54
  • Number of attempts: 1
-a-b-c- - 3183 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 15
  • Position: #561 / 1132
  • Number of attempts: 2
Two become one - 713 entries

We have two c arrays and want to make one two dimensional out of it. Can we do that?

  • Best score: 25
  • Best player score: 31
  • Position: #104 / 208
  • Number of attempts: 6
Words in parens - 12868 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 16
  • Position: #2224 / 3950
  • Number of attempts: 1
Pairs of numbers - 361 entries

Line 1 represents x, line 2 y-data. Bring the corresponding pairs in the form "[x,y]\n"

  • Best score: 26
  • Best player score: 35
  • Position: #65 / 134
  • Number of attempts: 1
Define to require - 119 entries

When JSHint is enabled, there's a rule that doesn't let you have more than 6 arguments in a function, so the moment you need to add a 7th argument, you need to do a refactoring.

  • Best score: 62
  • Best player score: 102
  • Position: #38 / 49
  • Number of attempts: 1
SFD-ROC: The Quick Brown Fox - 175 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: 28
  • Position: #74 / 104
  • Number of attempts: 1
Vertical Limit - 2487 entries

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

  • Best score: 21
  • Best player score: 25
  • Position: #354 / 748
  • Number of attempts: 7
Remove noise from HTTP log - 700 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: #99 / 272
  • Number of attempts: 2
constructor - 181 entries

coding a constructor for a simple class

  • Best score: 59
  • Best player score: 88
  • Position: #24 / 59
  • Number of attempts: 8
Make it more readable - 1955 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 18
  • Position: #525 / 643
  • Number of attempts: 3
PHP Array Syntax -> MailChimp Merge Syntax - 508 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: 27
  • Position: #64 / 149
  • Number of attempts: 4
Mauro Persano
Twitter:

entered into 22 challenges

contributed 0 challenges