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: 26
  • Position: #3637 / 7474
  • Number of attempts: 4
Swap values - 4661 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 11
  • Position: #253 / 1282
  • Number of attempts: 6
One number per line - 18831 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 19
  • Position: #1849 / 3889
  • Number of attempts: 2
Swap values inside brackets - 2523 entries

Easy challenge.

  • Best score: 13
  • Best player score: 22
  • Position: #454 / 587
  • Number of attempts: 5
V to the i - 4830 entries

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

  • Best score: 7
  • Best player score: 7
  • Position: #606 / 1903
  • Number of attempts: 6
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: 13
  • Position: #68 / 863
  • Number of attempts: 9
Extract argument from function - 2376 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #215 / 759
  • Number of attempts: 9
Search and Replace 0 - 5027 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #543 / 1637
  • Number of attempts: 4
Just the middle - 11541 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #2760 / 4230
  • Number of attempts: 3
Basic renumbering - 5699 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 25
  • Position: #1158 / 1273
  • Number of attempts: 3
Vice versa - 7974 entries

Little role switching.

  • Best score: 12
  • Best player score: 12
  • Position: #420 / 2146
  • Number of attempts: 8
comments galore - 1073 entries

Basic comment reformatting

  • Best score: 10
  • Best player score: 14
  • Position: #400 / 429
  • Number of attempts: 2
Collect List - 4317 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 12
  • Position: #396 / 1194
  • Number of attempts: 2
camel riding - 793 entries

add a prefix on some camelCase variables

  • Best score: 15
  • Best player score: 19
  • Position: #256 / 281
  • Number of attempts: 1
I forgot quotes - 16093 entries

Oops.

  • Best score: 10
  • Best player score: 16
  • Position: #2666 / 4202
  • Number of attempts: 3
A HAPPY NEW YEAR 2014 ! - 10713 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Position: #1331 / 3700
  • Number of attempts: 3
Words in parens - 12992 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 17
  • Position: #2724 / 3977
  • Number of attempts: 3
Vertical Limit - 2596 entries

transform a succession of one word lines to a an array of strings

  • Best score: 21
  • Best player score: 23
  • Position: #250 / 767
  • Number of attempts: 1
replacing each line of a block selection - 3007 entries

replace each line's ../assets/js with /javascripts

  • Best score: 18
  • Best player score: 21
  • Position: #408 / 780
  • Number of attempts: 3
Switch function arguments - 2182 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 11
  • Position: #161 / 674
  • Number of attempts: 4
Remove noise from HTTP log - 729 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: 28
  • Position: #269 / 276
  • Number of attempts: 1
switch variable - 5094 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 12
  • Position: #953 / 1754
  • Number of attempts: 2
A Simple One - 1067 entries

Here is a very simple one - just to illustrate/introduce a vim feature that some people seem to miss...

  • Best score: 9
  • Best player score: 13
  • Position: #643 / 671
  • Number of attempts: 2
The Cake is a Lie - 1386 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 10
  • Position: #388 / 537
  • Number of attempts: 1
Change the content of a string - 1707 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 25
  • Position: #408 / 628
  • Number of attempts: 2
Sort and add attributes - 1539 entries

Sort the states and add the attribute country to each record.

  • Best score: 33
  • Best player score: 33
  • Position: #212 / 594
  • Number of attempts: 3
Reconstruct the Sentence - 1677 entries

Get the sentence back in the proper order, remove duplicate lines, and then combine the separate lines into one.

  • Best score: 19
  • Best player score: 27
  • Position: #389 / 440
  • Number of attempts: 1
Simple text editing with Vim - 13262 entries

Make the pairs of lines match up by making each second line same as first

  • Best score: 13
  • Best player score: 19
  • Position: #2810 / 3810
  • Number of attempts: 2
Reformat/Refactor a Golfer Class - 7389 entries

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

  • Best score: 7
  • Best player score: 49
  • Position: #1408 / 1825
  • Number of attempts: 2
faisal
Twitter:

entered into 29 challenges

contributed 0 challenges