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

Search and Replace 0 - 4978 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #314 / 1621
  • Number of attempts: 5
Two become one - 713 entries

We have two c arrays and want to make one two dimensional out of it. Can we do that?

  • Best score: 25
  • Best player score: 26
  • Position: #14 / 208
  • Number of attempts: 9
Vim tetris - 353 entries

Vim can play tetris too!

  • Best score: 21
  • Best player score: 21
  • Position: #14 / 102
  • Number of attempts: 8
Mess in revision history - 1183 entries

Help Joe clean up what Steve has cobbled.

  • Best score: 17
  • Best player score: 22
  • Position: #120 / 249
  • Number of attempts: 5
attr_aligner - 3502 entries

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

  • Best score: 19
  • Best player score: 19
  • Position: #61 / 697
  • Number of attempts: 10
Letter case trickery - 1624 entries

This file is in a downright esoteric format, consisting of hexadecimal numbers, non-hexadecimal keywords, and "Z" indicating end-of-line. Make the hexadecimal numbers lowercase.

  • Best score: 9
  • Best player score: 10
  • Position: #106 / 517
  • Number of attempts: 7
quotes inside quotes - 3158 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: 14
  • Position: #142 / 1077
  • Number of attempts: 6
Words in parens - 12929 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #353 / 3961
  • Number of attempts: 3
Hole-in-one - 1018 entries

Lets take this golf thing literally.. Drive off the tee into the hole, and of course you don't strike the ball completely clean.

  • Best score: 15
  • Best player score: 16
  • Position: #61 / 304
  • Number of attempts: 6
A simple change - 461 entries

Just change the numbers in the most efficient way ...

  • Best score: 12
  • Best player score: 12
  • Position: #21 / 191
  • Number of attempts: 9
Saving the hashes(#) - 2063 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: 20
  • Position: #23 / 480
  • Number of attempts: 11
Vertical Limit - 2538 entries

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

  • Best score: 21
  • Best player score: 21
  • Position: #27 / 754
  • Number of attempts: 5
replacing each line of a block selection - 2999 entries

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

  • Best score: 18
  • Best player score: 19
  • Position: #166 / 777
  • Number of attempts: 10
Switch function arguments - 2126 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 11
  • Position: #95 / 660
  • Number of attempts: 5
switch variable - 5071 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 11
  • Position: #293 / 1748
  • Number of attempts: 5
Whitespace, empty lines and tabs - 3596 entries

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

  • Best score: 16
  • Best player score: 17
  • Position: #101 / 778
  • Number of attempts: 10
Simple text editing with Vim - 12723 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #266 / 3676
  • Number of attempts: 6
Reformat/Refactor a Golfer Class - 6914 entries

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

  • Best score: 28
  • Best player score: 32
  • Position: #100 / 1695
  • Number of attempts: 13
kiho choi
Twitter:

습관 처럼 어딘가로 흘러 들어가고 있는 썪어가는 나뭇잎에게 바람에 녹아든 가을 산이 색을 입혀준다.

entered into 18 challenges

contributed 0 challenges