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

C Reformatting - 581 entries

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

  • Best score: 30
  • Best player score: 58
  • Number of attempts: 2
Make HTML List - 855 entries

Turn the comma separated list into an unordered html list.

  • Best score: 33
  • Best player score: 48
  • Number of attempts: 1
Array of characters - 107 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
  • Number of attempts: 1
Alsa configuration - 456 entries

I'm tweaking my ~/.asoundrc file!

  • Best score: 22
  • Best player score: 30
  • Number of attempts: 1
Replace and keep the case - 330 entries

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

  • Best score: 26
  • Best player score: 28
  • Number of attempts: 2
Saving the hashes(#) - 1688 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
  • Number of attempts: 1
attr_aligner - 2847 entries

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

  • Best score: 19
  • Best player score: 26
  • Number of attempts: 3
Make it more readable - 1719 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 16
  • Number of attempts: 1
Don't know what this is - 1669 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
  • Number of attempts: 1
Extract argument from function - 1928 entries

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

  • Best score: 13
  • Best player score: 13
  • Number of attempts: 3
Generate a list of numbers - 235 entries

Please generate list of numbers from 1 to 20.

  • Best score: 14
  • Best player score: 14
  • Number of attempts: 1
That hyphen - 1992 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 12
  • Number of attempts: 3
V to the i - 3693 entries

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

  • Best score: 7
  • Best player score: 8
  • Number of attempts: 1
switch variable - 4189 entries

how fast can you switch two variable ?

  • Best score: 3
  • Best player score: 12
  • Number of attempts: 2
Paragraph sort - 305 entries

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

  • Best score: 14
  • Best player score: 18
  • Number of attempts: 1
-a-b-c- - 2474 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 16
  • Number of attempts: 1
Search and Replace 0 - 3921 entries

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

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 2
comments galore - 883 entries

Basic comment reformatting

  • Best score: 10
  • Best player score: 10
  • Number of attempts: 1
Count both ways - 854 entries

Right AND down.

  • Best score: 13
  • Best player score: 16
  • Number of attempts: 1
Space out the alphabet - 1318 entries

Put 3 spaces between adjacent letters.

  • Best score: 15
  • Best player score: 17
  • Number of attempts: 2
Scrambled numbers - 704 entries

Four is NOT 1. One is 1.

  • Best score: 18
  • Best player score: 24
  • Number of attempts: 3
Align commas - 767 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
  • Number of attempts: 2
quotes inside quotes - 2684 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: 2
  • Best player score: 17
  • Number of attempts: 1
From A to B - 487 entries

Mirror and change this text block

  • Best score: 16
  • Best player score: 18
  • Number of attempts: 1
replacing each line of a block selection - 2440 entries

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

  • Best score: 17
  • Best player score: 23
  • Number of attempts: 1
Pretty multi-line bash - 194 entries

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

  • Best score: 15
  • Best player score: 21
  • Number of attempts: 1
Whitespace, empty lines and tabs - 2518 entries

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

  • Best score: 16
  • Best player score: 23
  • Number of attempts: 3
7th Birthday - 163 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
  • Number of attempts: 1
Mess in revision history - 936 entries

Help Joe clean up what Steve has cobbled.

  • Best score: 17
  • Best player score: 24
  • Number of attempts: 1
Etienne Florent
Twitter:

entered into 29 challenges

contributed 0 challenges