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

Simple, Practical, and Common - 33787 entries

Simple things we do all the time should be able to be done with very few keystrokes, but sometimes I find something I need to do makes me go, "There MUST be a better way." This challenge is just a simple movement and entering text at a certain place.

  • Best score: 22
  • Best player score: 22
  • Position: #500 / 7454
  • Number of attempts: 4
Search and Replace 0 - 5007 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #223 / 1631
  • Number of attempts: 2
O Christmas Tree - 109 entries

Design a macro that makes trees grow (or ASCII triangles, if that's too hard).

  • Best score: 22
  • Best player score: 27
  • Position: #18 / 43
  • Number of attempts: 1
Going underground.... - 357 entries

Simple reformatting: in this case changing from the format London underground supplies its customers with, to the format that Google Calendar likes...

  • Best score: 22
  • Best player score: 28
  • Position: #38 / 129
  • Number of attempts: 2
Split the words - 372 entries

Add the spaces manually if you must, but if you use Vim's spell checking feature wisely, I think you'll save a LARGE number of strokes.

  • Best score: 18
  • Best player score: 35
  • Position: #40 / 112
  • Number of attempts: 3
A HAPPY NEW YEAR 2014 ! - 10699 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 12
  • Position: #1645 / 3695
  • Number of attempts: 1
Counting in binary - 526 entries

"a" represents 0; "A" represents 1. Start from zero and count to 15.

  • Best score: 16
  • Best player score: 21
  • Position: #31 / 117
  • Number of attempts: 3
Letter case trickery - 1644 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: 12
  • Position: #312 / 520
  • Number of attempts: 3
Hanging Indent for Footnotes - 72 entries

Format this footnote (in kramdown syntax) so that it has hanging indent.

  • Best score: 17
  • Best player score: 29
  • Position: #28 / 30
  • Number of attempts: 1
Number an outline - 280 entries

The indent and words are right, but the numbers are all wrong.

  • Best score: 25
  • Best player score: 59
  • Position: #49 / 78
  • Number of attempts: 2
Words in parens - 12975 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 15
  • Position: #1220 / 3971
  • Number of attempts: 5
Pairs of numbers - 364 entries

Line 1 represents x, line 2 y-data. Bring the corresponding pairs in the form "[x,y]\n"

  • Best score: 26
  • Best player score: 27
  • Position: #14 / 137
  • Number of attempts: 2
Assign list - 193 entries

Assign list elements to matrix

  • Best score: 30
  • Best player score: 55
  • Position: #48 / 62
  • Number of attempts: 1
Draw the Go board - 149 entries

which is a 19×19 lines board. Here we use ascii characters only for simplicity. See diff file to get a sense. (See also http://en.wikipedia.org/wiki/Go_(game))

  • Best score: 50
  • Best player score: 50
  • Position: #2 / 51
  • Number of attempts: 4
Hole-in-one - 1024 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: #11 / 305
  • Number of attempts: 3
abcd > a b c d - 298 entries

transform the single spaces into 4 spaces repeat for each line

  • Best score: 15
  • Best player score: 15
  • Position: #40 / 227
  • Number of attempts: 1
The Quick Brown Fox Jumps Over The Lazy Vim - 425 entries

Someone has vandalized this text file and replaced the beginning character of one word in each line with a Big "X." Please remove the big X's, and fix each line to read "The Quick Brown Fox Jumps Over The Lazy Dog."

  • Best score: 8
  • Best player score: 11
  • Position: #114 / 193
  • Number of attempts: 1
The name of the game - 678 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Position: #114 / 363
  • Number of attempts: 1
lamb had a little Mary - 637 entries

"Mary" and "lamb" are swapped. Unswap them. Fast as you can.

  • Best score: 16
  • Best player score: 39
  • Position: #128 / 174
  • Number of attempts: 1
SFD-ROC: vimvimvim - 1617 entries

Oh no, this line is longer than 80 chars... put each 'vim' on a new line.

  • Best score: 8
  • Best player score: 9
  • Position: #181 / 448
  • Number of attempts: 2
Stairs Indenting - 479 entries

Indent each line with <line number> whitespaces.

  • Best score: 12
  • Best player score: 16
  • Position: #161 / 199
  • Number of attempts: 2
Let's play some Ivmgolf - 1130 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 9
  • Position: #168 / 448
  • Number of attempts: 1
Vertical Limit - 2574 entries

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

  • Best score: 21
  • Best player score: 26
  • Position: #433 / 761
  • Number of attempts: 4
replacing each line of a block selection - 3005 entries

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

  • Best score: 18
  • Best player score: 21
  • Position: #357 / 779
  • Number of attempts: 3
Append semicolon after expressions - 1057 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 12
  • Position: #189 / 420
  • Number of attempts: 1
switch variable - 5085 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 12
  • Position: #748 / 1750
  • Number of attempts: 3
Make it more readable - 2009 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 15
  • Position: #253 / 652
  • Number of attempts: 3
Numbering a List - 1939 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 20
  • Position: #313 / 655
  • Number of attempts: 2
Simple text editing with Vim - 13129 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #1101 / 3775
  • Number of attempts: 3
Reformat/Refactor a Golfer Class - 7252 entries

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

  • Best score: 10
  • Best player score: 35
  • Position: #358 / 1790
  • Number of attempts: 5
Roland Schatz
Twitter:

entered into 30 challenges

contributed 0 challenges