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

"vim vi improved"

  • Best score: 9
  • Best player score: 12
  • Position: #430 / 695
  • Number of attempts: 1
Just the middle - 11360 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #1829 / 4164
  • Number of attempts: 3
Python Hello World! Reformatting - 938 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: #117 / 364
  • Number of attempts: 3
Vice versa - 7803 entries

Little role switching.

  • Best score: 12
  • Best player score: 16
  • Position: #1163 / 2100
  • Number of attempts: 2
camel riding - 769 entries

add a prefix on some camelCase variables

  • Best score: 15
  • Best player score: 18
  • Position: #214 / 274
  • Number of attempts: 1
Land of the Lost - 77 entries

Enter the tabs below the lyrics

  • Best score: 26
  • Best player score: 55
  • Position: #26 / 30
  • Number of attempts: 1
readability - 312 entries

Make the code readable by adding some spaces

  • Best score: 18
  • Best player score: 20
  • Position: #135 / 148
  • Number of attempts: 1
Interleave lines - 158 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: #24 / 58
  • Number of attempts: 4
Logging with key - 301 entries

Sometimes it is better to log with meaningful key

  • Best score: 21
  • Best player score: 29
  • Position: #49 / 86
  • Number of attempts: 8
Test everything! - 162 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: #19 / 52
  • Number of attempts: 3
increment by column in XML - 146 entries

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

  • Best score: 19
  • Best player score: 44
  • Position: #51 / 53
  • Number of attempts: 1
-a-b-c- - 3176 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 15
  • Position: #559 / 1129
  • Number of attempts: 2
Two become one - 710 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: #103 / 205
  • Number of attempts: 6
Words in parens - 12854 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 16
  • Position: #2222 / 3945
  • Number of attempts: 1
Pairs of numbers - 360 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: #64 / 133
  • Number of attempts: 1
Define to require - 118 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: #37 / 48
  • Number of attempts: 1
SFD-ROC: The Quick Brown Fox - 169 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: #72 / 101
  • Number of attempts: 1
Vertical Limit - 2437 entries

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

  • Best score: 21
  • Best player score: 25
  • Position: #349 / 736
  • Number of attempts: 7
Remove noise from HTTP log - 695 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 / 270
  • Number of attempts: 2
constructor - 180 entries

coding a constructor for a simple class

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

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 18
  • Position: #524 / 640
  • Number of attempts: 3
PHP Array Syntax -> MailChimp Merge Syntax - 507 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: #63 / 148
  • Number of attempts: 4
Mauro Persano
Twitter:

entered into 22 challenges

contributed 0 challenges