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 - 34031 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: #2438 / 7520
  • Number of attempts: 4
Extract argument from function - 2430 entries

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

  • Best score: 13
  • Best player score: 15
  • Position: #413 / 774
  • Number of attempts: 1
Search and Replace 0 - 5170 entries

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

  • Best score: 7
  • Best player score: 18
  • Position: #1393 / 1680
  • Number of attempts: 1
Swap assigned value - 696 entries

Simple problem but looking for interesting solutions.

  • Best score: 10
  • Best player score: 12
  • Position: #214 / 264
  • Number of attempts: 4
ASCII box - 379 entries

Don't forget to fix typos!

  • Best score: 23
  • Best player score: 27
  • Position: #68 / 112
  • Number of attempts: 2
Mute the second method of this script - 466 entries

prepend a # infront of every line of the second method

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

Help me put the newline.

  • Best score: 7
  • Best player score: 8
  • Position: #247 / 453
  • Number of attempts: 1
HTML formatting: vertical alignment for readability - 101 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: #26 / 39
  • Number of attempts: 1
Words in parens - 13063 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 16
  • Position: #2109 / 3995
  • Number of attempts: 2
Minimalist Limerick - 540 entries

Reproduce this lovely poem.

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

transform the single spaces into 4 spaces repeat for each line

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

End up with the name of the game.

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

Oops, I spelled that wrong.

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

How to switch two arguments of a function.

  • Best score: 7
  • Best player score: 12
  • Position: #265 / 687
  • Number of attempts: 3
Remove noise from HTTP log - 760 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: #249 / 282
  • Number of attempts: 1
switch variable - 5136 entries

how fast can you switch two variable ?

  • Best score: 9
  • Best player score: 14
  • Position: #1364 / 1767
  • Number of attempts: 1
The meaning - 589 entries

Numbers are fun!

  • Best score: 5
  • Best player score: 5
  • Position: #226 / 369
  • Number of attempts: 1
Context insensitive completion 0 - 611 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: #154 / 258
  • Number of attempts: 3
Reformat a C golf submission - 682 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: #69 / 223
  • Number of attempts: 3
Change the content of a string - 1810 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 25
  • Position: #423 / 659
  • Number of attempts: 3
Reformat/Refactor a Golfer Class - 7737 entries

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

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

Mediocrity as a service

entered into 21 challenges

contributed 0 challenges