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

Simple, Practical, and Common - 34012 entries

Simple things we do all the time should be able to be done with very few keystrokes, but sometimes I find something I need to do makes me go, "There MUST be a better way." This challenge is just a simple movement and entering text at a certain place.

  • Best score: 22
  • Best player score: 23
  • Position: #2436 / 7513
  • Number of attempts: 4
Extract argument from function - 2427 entries

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

  • Best score: 13
  • Best player score: 15
  • Position: #412 / 772
  • Number of attempts: 1
Search and Replace 0 - 5159 entries

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

  • Best score: 12
  • Best player score: 18
  • Position: #1387 / 1674
  • Number of attempts: 1
Swap assigned value - 694 entries

Simple problem but looking for interesting solutions.

  • Best score: 10
  • Best player score: 12
  • Position: #213 / 263
  • Number of attempts: 4
ASCII box - 378 entries

Don't forget to fix typos!

  • Best score: 23
  • Best player score: 27
  • Position: #67 / 111
  • Number of attempts: 2
Mute the second method of this script - 463 entries

prepend a # infront of every line of the second method

  • Best score: 8
  • Best player score: 9
  • Position: #13 / 244
  • Number of attempts: 1
Where should I put the Newline? - 908 entries

Help me put the newline.

  • Best score: 7
  • Best player score: 8
  • Position: #246 / 449
  • Number of attempts: 1
HTML formatting: vertical alignment for readability - 100 entries

We did this a VimGolf challenge at work and now that we have finished I want to see if you guys can come up with something even better than we could. Our best solution was 44 keystrokes.

  • Best score: 32
  • Best player score: 61
  • Position: #25 / 38
  • Number of attempts: 1
Words in parens - 13053 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 16
  • Position: #2106 / 3991
  • Number of attempts: 2
Minimalist Limerick - 539 entries

Reproduce this lovely poem.

  • Best score: 30
  • Best player score: 38
  • Position: #119 / 177
  • Number of attempts: 2
abcd > a b c d - 308 entries

transform the single spaces into 4 spaces repeat for each line

  • Best score: 15
  • Best player score: 15
  • Position: #130 / 231
  • Number of attempts: 1
The name of the game - 696 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Position: #168 / 369
  • Number of attempts: 1
Let's play some Ivmgolf - 1162 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 9
  • Position: #257 / 459
  • Number of attempts: 2
Switch function arguments - 2229 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 12
  • Position: #264 / 684
  • Number of attempts: 3
Remove noise from HTTP log - 758 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: 18
  • Position: #248 / 281
  • Number of attempts: 1
switch variable - 5128 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 14
  • Position: #1361 / 1764
  • Number of attempts: 1
The meaning - 588 entries

Numbers are fun!

  • Best score: 5
  • Best player score: 5
  • Position: #226 / 368
  • Number of attempts: 1
Context insensitive completion 0 - 605 entries

Buried in the lines you're not supposed to add is the line "Add this line!" Add that line to the top of the file.

  • Best score: 6
  • Best player score: 8
  • Position: #152 / 255
  • Number of attempts: 3
Reformat a C golf submission - 678 entries

Take this C golf submission (for the "tiny but standards-compliant Hello World program" category, naturally), and turn it into formatted C code.

  • Best score: 22
  • Best player score: 28
  • Position: #67 / 220
  • Number of attempts: 3
Change the content of a string - 1799 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 25
  • Position: #419 / 655
  • Number of attempts: 3
Reformat/Refactor a Golfer Class - 7681 entries

A simple case of removing unneeded code and fixing broken indentation.

  • Best score: 7
  • Best player score: 68
  • Position: #1770 / 1889
  • Number of attempts: 1
ryk
Twitter:

Mediocrity as a service

entered into 21 challenges

contributed 0 challenges