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

"vim vi improved"

  • Best score: 9
  • Best player score: 12
  • Position: #439 / 712
  • Number of attempts: 1
Just the middle - 11620 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #1846 / 4258
  • Number of attempts: 3
Python Hello World! Reformatting - 1052 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: #128 / 400
  • Number of attempts: 3
Vice versa - 8021 entries

Little role switching.

  • Best score: 12
  • Best player score: 16
  • Position: #1187 / 2158
  • Number of attempts: 2
camel riding - 817 entries

add a prefix on some camelCase variables

  • Best score: 15
  • Best player score: 18
  • Position: #222 / 285
  • Number of attempts: 1
Land of the Lost - 100 entries

Enter the tabs below the lyrics

  • Best score: 25
  • Best player score: 55
  • Position: #29 / 35
  • Number of attempts: 1
readability - 342 entries

Make the code readable by adding some spaces

  • Best score: 18
  • Best player score: 20
  • Position: #143 / 156
  • Number of attempts: 1
Interleave lines - 210 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: #28 / 63
  • Number of attempts: 4
Logging with key - 343 entries

Sometimes it is better to log with meaningful key

  • Best score: 21
  • Best player score: 29
  • Position: #53 / 90
  • Number of attempts: 8
Test everything! - 214 entries

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

  • Best score: 21
  • Best player score: 26
  • Position: #23 / 59
  • Number of attempts: 3
increment by column in XML - 168 entries

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

  • Best score: 19
  • Best player score: 44
  • Position: #56 / 58
  • Number of attempts: 1
-a-b-c- - 3242 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 15
  • Position: #568 / 1147
  • Number of attempts: 2
Two become one - 739 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: #107 / 213
  • Number of attempts: 6
Words in parens - 13054 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 16
  • Position: #2250 / 3991
  • Number of attempts: 1
Pairs of numbers - 387 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: #66 / 138
  • Number of attempts: 1
Define to require - 143 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: #39 / 52
  • Number of attempts: 1
SFD-ROC: The Quick Brown Fox - 212 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: #77 / 110
  • Number of attempts: 1
Vertical Limit - 2637 entries

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

  • Best score: 21
  • Best player score: 25
  • Position: #368 / 778
  • Number of attempts: 7
Remove noise from HTTP log - 759 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 / 281
  • Number of attempts: 2
constructor - 198 entries

coding a constructor for a simple class

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

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 18
  • Position: #537 / 658
  • Number of attempts: 3
PHP Array Syntax -> MailChimp Merge Syntax - 569 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: #67 / 152
  • Number of attempts: 4
Mauro Persano
Twitter:

entered into 22 challenges

contributed 0 challenges