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

Prime Numbers - 385 entries

List the first 100 prime numbers.

  • Best score: 34
  • Best player score: 374
  • Position: #99 / 107
  • Number of attempts: 1
Search and Replace 0 - 5042 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #89 / 1643
  • Number of attempts: 5
Counting in binary - 526 entries

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

  • Best score: 16
  • Best player score: 58
  • Position: #109 / 117
  • Number of attempts: 1
Words in parens - 13001 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 16
  • Position: #1920 / 3978
  • Number of attempts: 1
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: 19
  • Position: #154 / 305
  • Number of attempts: 2
Delete unwanted lines - 431 entries

Delete all lines which does not end in "o.."

  • Best score: 9
  • Best player score: 10
  • Position: #203 / 234
  • Number of attempts: 1
Prefixes and suffixes - 646 entries

Generate all prefixes of "vimchallenge", then all suffixes.

  • Best score: 17
  • Best player score: 28
  • Position: #124 / 204
  • Number of attempts: 1
replacing each line of a block selection - 3026 entries

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

  • Best score: 18
  • Best player score: 25
  • Position: #536 / 783
  • Number of attempts: 4
Switch function arguments - 2188 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 13
  • Position: #375 / 676
  • Number of attempts: 1
Append semicolon after expressions - 1061 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 11
  • Position: #45 / 421
  • Number of attempts: 2
switch variable - 5101 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 12
  • Position: #754 / 1756
  • Number of attempts: 1
Make it more readable - 2015 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 19
  • Position: #564 / 654
  • Number of attempts: 1
remove dupes from array - 1361 entries

given a random string that contains a ruby-esque array, make sure that there are no duplicate elements

  • Best score: 17
  • Best player score: 22
  • Position: #170 / 338
  • Number of attempts: 2
HTML to Haml - 883 entries

Help convert this HTML page to Haml.

  • Best score: 23
  • Best player score: 46
  • Position: #150 / 206
  • Number of attempts: 2
Numbering a List - 1941 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 22
  • Position: #440 / 657
  • Number of attempts: 1
Round Round - 321 entries

Round Round

  • Best score: 19
  • Best player score: 91
  • Position: #64 / 88
  • Number of attempts: 2
Reverse and count - 486 entries

Someone typed things upside down and now a Vim ninja needs to reverse the lines and count how many there are.

  • Best score: 18
  • Best player score: 39
  • Position: #166 / 179
  • Number of attempts: 1
Another Mixed-Up Haiku - 265 entries

VimGolf ... a perfect evening?

  • Best score: 21
  • Best player score: 23
  • Position: #44 / 90
  • Number of attempts: 3
Reverse Simple Deletion - 862 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 12
  • Position: #131 / 463
  • Number of attempts: 1
Increment, increment, increment.... - 703 entries

Vim likes macros

  • Best score: 10
  • Best player score: 27
  • Position: #408 / 414
  • Number of attempts: 1
Turn this csv list into queries - 252 entries

Transform each line of this csv file into a MySQL-ready INSERT query.

  • Best score: 98
  • Best player score: 179
  • Position: #95 / 101
  • Number of attempts: 1
Remove Accent off the Letter - 137 entries

Remove all the accent from extremely accented statements.

  • Best score: 37
  • Best player score: 62
  • Position: #23 / 52
  • Number of attempts: 3
Almost encrypted - 204 entries

Convert the first paragraph to be even less readable.

  • Best score: 5
  • Best player score: 5
  • Position: #17 / 146
  • Number of attempts: 1
Whitespace, empty lines and tabs - 3927 entries

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

  • Best score: 16
  • Best player score: 32
  • Position: #620 / 838
  • Number of attempts: 1
Simple text editing with Vim - 13369 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #1120 / 3834
  • Number of attempts: 1
Reformat/Refactor a Golfer Class - 7480 entries

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

  • Best score: 7
  • Best player score: 43
  • Position: #1066 / 1841
  • Number of attempts: 3
Joel Taylor
Twitter:

Footy and Haskell

entered into 26 challenges

contributed 0 challenges