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

Quicksort - 2002 entries

We need the numbers in the first row sorted as quickly as possible! Be careful not to disturb the data below the divider though: that must remain unchanged.

  • Best score: 6
  • Best player score: 24
  • Position: #234 / 440
  • Number of attempts: 4
Find fix point of cos - 1408 entries

Write a function to find the fix point of cos. It is not a good code; It is just to use vim. Inspired by the excellent https://mvanier.livejournal.com/2897.html about the Y combinator.

  • Best score: 14
  • Best player score: 18
  • Position: #309 / 418
  • Number of attempts: 1
Swap values - 4643 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 12
  • Position: #392 / 1274
  • Number of attempts: 5
V to the i - 4813 entries

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

  • Best score: 7
  • Best player score: 8
  • Position: #1163 / 1897
  • Number of attempts: 2
Extract argument from function - 2364 entries

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

  • Best score: 13
  • Best player score: 17
  • Position: #620 / 755
  • Number of attempts: 1
Search and Replace 0 - 5004 entries

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

  • Best score: 12
  • Best player score: 14
  • Position: #1014 / 1630
  • Number of attempts: 3
That hyphen - 2595 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 12
  • Position: #454 / 701
  • Number of attempts: 4
Just the middle - 11484 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 7
  • Position: #630 / 4209
  • Number of attempts: 3
Make HTML List - 1061 entries

Turn the comma separated list into an unordered html list.

  • Best score: 33
  • Best player score: 39
  • Position: #84 / 274
  • Number of attempts: 3
Basic renumbering - 5683 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 24
  • Position: #1123 / 1269
  • Number of attempts: 1
Vice versa - 7945 entries

Little role switching.

  • Best score: 12
  • Best player score: 17
  • Position: #1557 / 2138
  • Number of attempts: 2
comments galore - 1048 entries

Basic comment reformatting

  • Best score: 10
  • Best player score: 10
  • Position: #163 / 425
  • Number of attempts: 1
Scrambled numbers - 807 entries

Four is NOT 1. One is 1.

  • Best score: 18
  • Best player score: 32
  • Position: #150 / 184
  • Number of attempts: 2
Alsa configuration - 513 entries

I'm tweaking my ~/.asoundrc file!

  • Best score: 22
  • Best player score: 36
  • Position: #113 / 128
  • Number of attempts: 1
Collect List - 4305 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 20
  • Position: #1122 / 1191
  • Number of attempts: 3
Space out the alphabet - 1658 entries

Put 3 spaces between adjacent letters.

  • Best score: 15
  • Best player score: 15
  • Position: #56 / 445
  • Number of attempts: 7
I forgot quotes - 16022 entries

Oops.

  • Best score: 10
  • Best player score: 14
  • Position: #1649 / 4189
  • Number of attempts: 6
-a-b-c- - 3216 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 15
  • Position: #626 / 1138
  • Number of attempts: 1
A HAPPY NEW YEAR 2014 ! - 10682 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 14
  • Position: #2778 / 3689
  • Number of attempts: 1
attr_aligner - 3522 entries

Two attr keywords. Two separate indentations. Align the colons.

  • Best score: 19
  • Best player score: 32
  • Position: #493 / 703
  • Number of attempts: 2
quotes inside quotes - 3165 entries

taken from tip 85 of the very good book 'Practical Vim: Edit Text at the Speed of Thought' ! I'd be interested what people use :)

  • Best score: 14
  • Best player score: 16
  • Position: #631 / 1079
  • Number of attempts: 2
Words in parens - 12967 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 16
  • Position: #2319 / 3969
  • Number of attempts: 1
Vertical Limit - 2552 entries

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

  • Best score: 21
  • Best player score: 29
  • Position: #639 / 757
  • Number of attempts: 1
replacing each line of a block selection - 3001 entries

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

  • Best score: 18
  • Best player score: 35
  • Position: #730 / 778
  • Number of attempts: 1
Append semicolon after expressions - 1056 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 13
  • Position: #346 / 419
  • Number of attempts: 1
switch variable - 5079 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 12
  • Position: #891 / 1749
  • Number of attempts: 1
The Cake is a Lie - 1361 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 10
  • Position: #377 / 531
  • Number of attempts: 1
Sort and add attributes - 1477 entries

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

  • Best score: 33
  • Best player score: 33
  • Position: #197 / 575
  • Number of attempts: 1
Simple text editing with Vim - 12989 entries

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

  • Best score: 13
  • Best player score: 30
  • Position: #3430 / 3737
  • Number of attempts: 1
Reformat/Refactor a Golfer Class - 7154 entries

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

  • Best score: 28
  • Best player score: 52
  • Position: #1459 / 1754
  • Number of attempts: 1
iNaKoll
Twitter:

entered into 30 challenges

contributed 0 challenges