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

V to the i - 4751 entries

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

  • Best score: 7
  • Best player score: 8
  • Position: #1199 / 1879
  • Number of attempts: 1
Extract argument from function - 2314 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #178 / 744
  • Number of attempts: 3
Search and Replace 0 - 4790 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #468 / 1585
  • Number of attempts: 2
That hyphen - 2556 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 12
  • Position: #460 / 695
  • Number of attempts: 3
Make HTML List - 1039 entries

Turn the comma separated list into an unordered html list.

  • Best score: 33
  • Best player score: 48
  • Position: #164 / 271
  • Number of attempts: 1
Pretty multi-line bash - 218 entries

Bash line continuations are much prettier when they're column aligned.

  • Best score: 15
  • Best player score: 21
  • Position: #41 / 75
  • Number of attempts: 1
7th Birthday - 186 entries

We have a bunch of numbers written from 0 to 9 in the order present in the text input file. The task is to create 7 by replacing the numbers with dashes.

  • Best score: 19
  • Best player score: 23
  • Position: #38 / 73
  • Number of attempts: 1
C Reformatting - 688 entries

You may use Visual mode... or not. #uppercase

  • Best score: 30
  • Best player score: 58
  • Position: #113 / 161
  • Number of attempts: 2
Paragraph sort - 430 entries

My large herbivorous mammals, Vim commands, and POSIX utilities need to be sorted separately.

  • Best score: 14
  • Best player score: 18
  • Position: #87 / 123
  • Number of attempts: 1
Array of characters - 153 entries

We all copy paste things off the internet, but the syntax doesn't look right. Fix it as fast as possible.

  • Best score: 33
  • Best player score: 42
  • Position: #32 / 45
  • Number of attempts: 1
comments galore - 998 entries

Basic comment reformatting

  • Best score: 10
  • Best player score: 10
  • Position: #208 / 418
  • Number of attempts: 1
Replace and keep the case - 407 entries

Replace all instance of plugin and Plugin to device and Device.

  • Best score: 26
  • Best player score: 28
  • Position: #64 / 115
  • Number of attempts: 2
Scrambled numbers - 779 entries

Four is NOT 1. One is 1.

  • Best score: 18
  • Best player score: 24
  • Position: #114 / 182
  • Number of attempts: 3
Alsa configuration - 491 entries

I'm tweaking my ~/.asoundrc file!

  • Best score: 22
  • Best player score: 30
  • Position: #86 / 125
  • Number of attempts: 1
Align commas - 1049 entries

There are 15,000 aligning challenges on vimgolf.com, and they're all exactly the same. I hope this one is a little different.

  • Best score: 11
  • Best player score: 16
  • Position: #131 / 241
  • Number of attempts: 2
Generate a list of numbers - 283 entries

Please generate list of numbers from 1 to 20.

  • Best score: 14
  • Best player score: 14
  • Position: #38 / 136
  • Number of attempts: 1
From A to B - 564 entries

Mirror and change this text block

  • Best score: 16
  • Best player score: 18
  • Position: #102 / 155
  • Number of attempts: 1
Space out the alphabet - 1627 entries

Put 3 spaces between adjacent letters.

  • Best score: 15
  • Best player score: 17
  • Position: #187 / 440
  • Number of attempts: 2
-a-b-c- - 3176 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 16
  • Position: #822 / 1129
  • Number of attempts: 1
Count both ways - 1001 entries

Right AND down.

  • Best score: 13
  • Best player score: 16
  • Position: #257 / 351
  • Number of attempts: 1
Don't know what this is - 1978 entries

Replace contents of brackets with matching number of spaces. Don't ask what the format's supposed to be.

  • Best score: 11
  • Best player score: 15
  • Position: #402 / 578
  • Number of attempts: 1
Mess in revision history - 1160 entries

Help Joe clean up what Steve has cobbled.

  • Best score: 17
  • Best player score: 24
  • Position: #141 / 246
  • Number of attempts: 1
attr_aligner - 3444 entries

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

  • Best score: 19
  • Best player score: 26
  • Position: #267 / 692
  • Number of attempts: 3
quotes inside quotes - 3125 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: 17
  • Position: #890 / 1072
  • Number of attempts: 1
Saving the hashes(#) - 1992 entries

The following file is copied from vimcasts.org(Its only for learning purpose,hope the site owner doesn't mind it), its probably the easiest of challenges.Our goal is to delete every line which doesn't contain a hash signs. The remaining hash signs with numbers are then sorted to get the final output.

  • Best score: 20
  • Best player score: 28
  • Position: #292 / 473
  • Number of attempts: 1
replacing each line of a block selection - 2946 entries

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

  • Best score: 18
  • Best player score: 23
  • Position: #472 / 767
  • Number of attempts: 1
switch variable - 5031 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 12
  • Position: #900 / 1735
  • Number of attempts: 2
Make it more readable - 1952 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 16
  • Position: #399 / 640
  • Number of attempts: 1
Whitespace, empty lines and tabs - 3339 entries

Convert tabs to spaces, strip empty lines and trailing whitespace.

  • Best score: 16
  • Best player score: 23
  • Position: #331 / 736
  • Number of attempts: 3
Etienne Florent
Twitter:

entered into 29 challenges

contributed 0 challenges