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 - 33600 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: #2410 / 7412
  • Number of attempts: 4
Extract argument from function - 2355 entries

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

  • Best score: 13
  • Best player score: 15
  • Position: #400 / 752
  • Number of attempts: 1
Search and Replace 0 - 4978 entries

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

  • Best score: 12
  • Best player score: 18
  • Position: #1342 / 1621
  • Number of attempts: 1
Swap assigned value - 643 entries

Simple problem but looking for interesting solutions.

  • Best score: 10
  • Best player score: 12
  • Position: #205 / 253
  • Number of attempts: 4
ASCII box - 347 entries

Don't forget to fix typos!

  • Best score: 23
  • Best player score: 27
  • Position: #63 / 107
  • Number of attempts: 2
Mute the second method of this script - 455 entries

prepend a # infront of every line of the second method

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

Help me put the newline.

  • Best score: 7
  • Best player score: 8
  • Position: #242 / 437
  • Number of attempts: 1
HTML formatting: vertical alignment for readability - 88 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: #24 / 36
  • Number of attempts: 1
Words in parens - 12928 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 16
  • Position: #2088 / 3960
  • Number of attempts: 2
Minimalist Limerick - 520 entries

Reproduce this lovely poem.

  • Best score: 30
  • Best player score: 38
  • Position: #118 / 174
  • Number of attempts: 2
abcd > a b c d - 290 entries

transform the single spaces into 4 spaces repeat for each line

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

End up with the name of the game.

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

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 9
  • Position: #251 / 445
  • Number of attempts: 2
Switch function arguments - 2125 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 12
  • Position: #257 / 659
  • Number of attempts: 3
Remove noise from HTTP log - 717 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: #240 / 273
  • Number of attempts: 1
switch variable - 5071 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 14
  • Position: #1347 / 1748
  • Number of attempts: 1
The meaning - 575 entries

Numbers are fun!

  • Best score: 5
  • Best player score: 5
  • Position: #226 / 363
  • Number of attempts: 1
Context insensitive completion 0 - 566 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: #142 / 244
  • Number of attempts: 3
Reformat a C golf submission - 589 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: #62 / 207
  • Number of attempts: 3
Change the content of a string - 1564 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 25
  • Position: #369 / 584
  • Number of attempts: 3
Reformat/Refactor a Golfer Class - 6902 entries

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

  • Best score: 28
  • Best player score: 68
  • Position: #1602 / 1691
  • Number of attempts: 1
ryk
Twitter:

Mediocrity as a service

entered into 21 challenges

contributed 0 challenges