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 - 4790 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #314 / 1585
  • Number of attempts: 5
Two become one - 710 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: #13 / 205
  • Number of attempts: 9
Vim tetris - 352 entries

Vim can play tetris too!

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

Help Joe clean up what Steve has cobbled.

  • Best score: 17
  • Best player score: 22
  • Position: #118 / 246
  • Number of attempts: 5
attr_aligner - 3444 entries

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

  • Best score: 19
  • Best player score: 19
  • Position: #61 / 692
  • Number of attempts: 10
Letter case trickery - 1594 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: #104 / 511
  • Number of attempts: 7
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: 14
  • Position: #142 / 1072
  • Number of attempts: 6
Words in parens - 12854 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #349 / 3945
  • Number of attempts: 3
Hole-in-one - 1012 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: #60 / 302
  • Number of attempts: 6
A simple change - 442 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #21 / 189
  • Number of attempts: 9
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: 20
  • Position: #23 / 473
  • Number of attempts: 11
Vertical Limit - 2437 entries

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

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

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

  • Best score: 18
  • Best player score: 19
  • Position: #161 / 767
  • Number of attempts: 10
Switch function arguments - 2078 entries

How to switch two arguments of a function.

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

how fast can you switch two variable ?

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

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

  • Best score: 16
  • Best player score: 17
  • Position: #92 / 736
  • Number of attempts: 10
Simple text editing with Vim - 12281 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 / 3580
  • Number of attempts: 6
Reformat/Refactor a Golfer Class - 6557 entries

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

  • Best score: 32
  • Best player score: 32
  • Position: #99 / 1614
  • Number of attempts: 13
kiho choi
Twitter:

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

entered into 18 challenges

contributed 0 challenges