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

V to the i - 4743 entries

Input is 99 V's. Output is 100 i's.

  • Best score: 7
  • Best player score: 8
  • Position: #822 / 1878
  • Number of attempts: 11
Extract argument from function - 2308 entries

The aim is to see if you can do some refactoring very fast.

  • Best score: 13
  • Best player score: 14
  • Position: #295 / 742
  • Number of attempts: 5
Search and Replace 0 - 4790 entries

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

  • Best score: 12
  • Best player score: 15
  • Position: #1080 / 1585
  • Number of attempts: 2
VimGolfNight - 531 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Position: #189 / 342
  • Number of attempts: 3
Neither Fizz nor Buzz - 226 entries

Not your regular increment macro! The gaps are tricky.

  • Best score: 13
  • Best player score: 15
  • Position: #19 / 99
  • Number of attempts: 7
Do you demand a shrubbery? - 1120 entries

Use :redir and crush the emacsgolfers.

  • Best score: 15
  • Best player score: 36
  • Position: #292 / 293
  • Number of attempts: 1
Don't know what this is - 1978 entries

Replace contents of brackets with matching number of spaces. Don't ask what the format's supposed to be.

  • Best score: 11
  • Best player score: 12
  • Position: #155 / 578
  • Number of attempts: 7
Where should I put the Newline? - 859 entries

Help me put the newline.

  • Best score: 7
  • Best player score: 8
  • Position: #290 / 430
  • Number of attempts: 6
Mess in revision history - 1157 entries

Help Joe clean up what Steve has cobbled.

  • Best score: 17
  • Best player score: 29
  • Position: #186 / 245
  • Number of attempts: 6
Shuffle puzzle - 317 entries

Sort the lines in each indent group, and sort the groups. That's the pattern. Or just move lines around manually to get a better score.

  • Best score: 13
  • Best player score: 21
  • Position: #95 / 101
  • Number of attempts: 1
A HAPPY NEW YEAR 2014 ! - 10616 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Position: #427 / 3663
  • Number of attempts: 4
attr_aligner - 3444 entries

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

  • Best score: 19
  • Best player score: 22
  • Position: #216 / 692
  • Number of attempts: 11
quotes inside quotes - 3124 entries

taken from tip 85 of the very good book 'Practical Vim: Edit Text at the Speed of Thought' ! I'd be interested what people use :)

  • Best score: 14
  • Best player score: 16
  • Position: #587 / 1071
  • Number of attempts: 4
Words in parens - 12848 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #418 / 3943
  • Number of attempts: 9
SFD-ROC: vimvimvim - 1569 entries

Oh no, this line is longer than 80 chars... put each 'vim' on a new line.

  • Best score: 8
  • Best player score: 8
  • Position: #59 / 437
  • Number of attempts: 13
Saving the hashes(#) - 1992 entries

The following file is copied from vimcasts.org(Its only for learning purpose,hope the site owner doesn't mind it), its probably the easiest of challenges.Our goal is to delete every line which doesn't contain a hash signs. The remaining hash signs with numbers are then sorted to get the final output.

  • Best score: 20
  • Best player score: 28
  • Position: #286 / 473
  • Number of attempts: 6
Let's play some Ivmgolf - 1084 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 9
  • Position: #256 / 440
  • Number of attempts: 1
replacing each line of a block selection - 2925 entries

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

  • Best score: 18
  • Best player score: 19
  • Position: #165 / 764
  • Number of attempts: 7
Switch function arguments - 2064 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 11
  • Position: #103 / 647
  • Number of attempts: 8
Append semicolon after expressions - 1002 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 13
  • Position: #323 / 401
  • Number of attempts: 1
switch variable - 5028 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 11
  • Position: #317 / 1734
  • Number of attempts: 9
Make it more readable - 1952 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 13
  • Position: #58 / 640
  • Number of attempts: 5
Assignment Alignment - 829 entries

line up the operators. Use spaces, not tabs.

  • Best score: 18
  • Best player score: 23
  • Position: #106 / 215
  • Number of attempts: 6
The Cake is a Lie - 1284 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 11
  • Position: #427 / 511
  • Number of attempts: 2
Simple text editing with Vim - 12233 entries

Make the pairs of lines match up by making each second line same as first

  • Best score: 13
  • Best player score: 17
  • Position: #2346 / 3567
  • Number of attempts: 7
PLS
Twitter:

entered into 25 challenges

contributed 0 challenges