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

Reformat/Refactor a Golfer Class - 5335 entries

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

  • Best score: 32
  • Best player score: 32
  • Number of attempts: 13
Two become one - 631 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
  • Number of attempts: 9
Vim tetris - 301 entries

Vim can play tetris too!

  • Best score: 21
  • Best player score: 21
  • Number of attempts: 8
Vertical Limit - 1995 entries

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

  • Best score: 21
  • Best player score: 21
  • Number of attempts: 5
Saving the hashes(#) - 1660 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
  • Number of attempts: 11
attr_aligner - 2779 entries

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

  • Best score: 19
  • Best player score: 19
  • Number of attempts: 10
Switch function arguments - 1771 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 5
Hole-in-one - 929 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
  • Number of attempts: 6
Search and Replace 0 - 3819 entries

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

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 5
switch variable - 4069 entries

how fast can you switch two variable ?

  • Best score: 3
  • Best player score: 11
  • Number of attempts: 5
A simple change - 350 entries

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

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 9
Letter case trickery - 1403 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
  • Number of attempts: 7
Simple text editing with Vim - 9863 entries

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

  • Best score: 13
  • Best player score: 13
  • Number of attempts: 6
Mess in revision history - 919 entries

Help Joe clean up what Steve has cobbled.

  • Best score: 17
  • Best player score: 22
  • Number of attempts: 5
Words in parens - 10279 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 14
  • Number of attempts: 3
replacing each line of a block selection - 2373 entries

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

  • Best score: 17
  • Best player score: 19
  • Number of attempts: 10
quotes inside quotes - 2632 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: 14
  • Number of attempts: 6
Whitespace, empty lines and tabs - 2488 entries

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

  • Best score: 16
  • Best player score: 17
  • Number of attempts: 10
kiho choi
Twitter:

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

entered into 18 challenges

contributed 0 challenges