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 - 33866 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: 29
  • Position: #4894 / 7474
  • Number of attempts: 3
One number per line - 18831 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 19
  • Position: #1898 / 3889
  • Number of attempts: 6
V to the i - 4830 entries

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

  • Best score: 7
  • Best player score: 9
  • Position: #1726 / 1903
  • Number of attempts: 2
Applying same text modification in several lines - 2915 entries

Remove identical text at the beginning of several lines and the closing parenthesis.

  • Best score: 12
  • Best player score: 18
  • Position: #689 / 863
  • Number of attempts: 1
Add semicolons - 10916 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 27
  • Position: #2950 / 3085
  • Number of attempts: 1
Box it - 7962 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 35
  • Position: #1624 / 1891
  • Number of attempts: 1
From argument to object - 1536 entries

This task typifies those programmers endure while coding. This C-family pseudocode needs a function argument to be repurposed as an object call. Simply search and replace? Repeat a pattern of edits?

  • Best score: 17
  • Best player score: 22
  • Position: #405 / 466
  • Number of attempts: 2
comment and uncomment code inline - 1151 entries

It's very useful to be able to comment out a block of code in a quick edit. And likewise to uncomment the code. This operation often involves multi-line stanzas and even large blocks. With just line-wise navigation and insert mode this would cost you about 4 keystrokes per line. Master this hole of VimGolf and you'll quickly drop your key count in day to day Vim as well.

  • Best score: 9
  • Best player score: 12
  • Position: #274 / 328
  • Number of attempts: 3
Basic renumbering - 5707 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 25
  • Position: #1164 / 1274
  • Number of attempts: 4
Adam's challenge - 1009 entries

Change both normal to bold and 4 by 2. Adam Wathan challenge this on twitter . He did it in 11 keystrokes on Sublime.

  • Best score: 18
  • Best player score: 26
  • Position: #250 / 276
  • Number of attempts: 2
Reorder the groups - 1185 entries

Change the order so that the groups of fruit come before the vegetables.

  • Best score: 14
  • Best player score: 30
  • Position: #245 / 266
  • Number of attempts: 2
Collect List - 4317 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 15
  • Position: #741 / 1194
  • Number of attempts: 2
I forgot quotes - 16093 entries

Oops.

  • Best score: 10
  • Best player score: 15
  • Position: #2311 / 4202
  • Number of attempts: 1
A HAPPY NEW YEAR 2014 ! - 10713 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 12
  • Position: #2395 / 3700
  • Number of attempts: 2
Switch function arguments - 2182 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 16
  • Position: #624 / 674
  • Number of attempts: 2
Case preserving word replacement - 456 entries

Half way through my project, my people turned into dogs. Now I have to change everything in my source.

  • Best score: 19
  • Best player score: 33
  • Position: #175 / 181
  • Number of attempts: 1
Reformat some Python - 627 entries

Fix some very bizarrely laid-out code.

  • Best score: 34
  • Best player score: 44
  • Position: #141 / 240
  • Number of attempts: 1
Chris G
Twitter:

Cat whisperer, world visitor, curious creature

entered into 17 challenges

contributed 0 challenges