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 - 33396 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: #2399 / 7367
  • Number of attempts: 4
Extract argument from function - 2316 entries

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

  • Best score: 13
  • Best player score: 15
  • Position: #395 / 745
  • Number of attempts: 1
Search and Replace 0 - 4792 entries

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

  • Best score: 12
  • Best player score: 18
  • Position: #1310 / 1585
  • Number of attempts: 1
Swap assigned value - 626 entries

Simple problem but looking for interesting solutions.

  • Best score: 10
  • Best player score: 12
  • Position: #203 / 250
  • Number of attempts: 4
ASCII box - 325 entries

Don't forget to fix typos!

  • Best score: 23
  • Best player score: 27
  • Position: #60 / 104
  • Number of attempts: 2
Mute the second method of this script - 447 entries

prepend a # infront of every line of the second method

  • Best score: 9
  • Best player score: 9
  • Position: #12 / 237
  • Number of attempts: 1
Where should I put the Newline? - 863 entries

Help me put the newline.

  • Best score: 7
  • Best player score: 8
  • Position: #239 / 431
  • Number of attempts: 1
HTML formatting: vertical alignment for readability - 63 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: 33
  • Best player score: 61
  • Position: #22 / 33
  • Number of attempts: 1
Words in parens - 12858 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 16
  • Position: #2078 / 3946
  • Number of attempts: 2
Minimalist Limerick - 516 entries

Reproduce this lovely poem.

  • Best score: 31
  • Best player score: 38
  • Position: #117 / 171
  • Number of attempts: 2
abcd > a b c d - 281 entries

transform the single spaces into 4 spaces repeat for each line

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

End up with the name of the game.

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

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 9
  • Position: #248 / 441
  • Number of attempts: 2
Switch function arguments - 2082 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 12
  • Position: #254 / 652
  • Number of attempts: 3
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: 18
  • Position: #237 / 270
  • Number of attempts: 1
switch variable - 5036 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 14
  • Position: #1340 / 1736
  • Number of attempts: 1
The meaning - 558 entries

Numbers are fun!

  • Best score: 5
  • Best player score: 5
  • Position: #226 / 356
  • Number of attempts: 1
Context insensitive completion 0 - 519 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: #135 / 233
  • Number of attempts: 3
Reformat a C golf submission - 559 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: #60 / 200
  • Number of attempts: 3
Change the content of a string - 1489 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 25
  • Position: #352 / 560
  • Number of attempts: 3
Reformat/Refactor a Golfer Class - 6563 entries

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

  • Best score: 32
  • Best player score: 68
  • Position: #1538 / 1617
  • Number of attempts: 1
ryk
Twitter:

Mediocrity as a service

entered into 21 challenges

contributed 0 challenges