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

V to the i - 4806 entries

Input is 99 V's. Output is 100 i's.

  • Best score: 7
  • Best player score: 8
  • Position: #809 / 1894
  • Number of attempts: 1
Search and Replace 0 - 4989 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #176 / 1624
  • Number of attempts: 4
Just the middle - 11457 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #1559 / 4198
  • Number of attempts: 4
Basic renumbering - 5648 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 24
  • Position: #1081 / 1264
  • Number of attempts: 1
Restore order to the alphabet - 201 entries

The numbers are OK. The letters are wonky.

  • Best score: 12
  • Best player score: 35
  • Position: #67 / 72
  • Number of attempts: 1
Mirror Symmetry - 822 entries

Add backslashes.

  • Best score: 7
  • Best player score: 13
  • Position: #175 / 269
  • Number of attempts: 1
Swap assigned value - 647 entries

Simple problem but looking for interesting solutions.

  • Best score: 10
  • Best player score: 20
  • Position: #249 / 254
  • Number of attempts: 2
Line 'em up! - 421 entries

It can be so hard to keep everything neatly lined-up. Somebody clearly hasn't bothered here. Tidy it up, please!

  • Best score: 17
  • Best player score: 31
  • Position: #95 / 114
  • Number of attempts: 2
Mute the second method of this script - 455 entries

prepend a # infront of every line of the second method

  • Best score: 8
  • Best player score: 11
  • Position: #224 / 239
  • Number of attempts: 2
Winning streak - 135 entries

Make the number on each line equal the consecutive L's or W's.

  • Best score: 21
  • Best player score: 40
  • Position: #45 / 51
  • Number of attempts: 1
Test everything! - 186 entries

... and build the desired input data structure. Transform a list of values into a non-trivial format.

  • Best score: 22
  • Best player score: 40
  • Position: #44 / 54
  • Number of attempts: 2
increment by column in XML - 152 entries

modify an arbitrary "column" in an xml table by incrementing a an arbitrary placeholder string

  • Best score: 19
  • Best player score: 29
  • Position: #48 / 55
  • Number of attempts: 2
Pretty format for variable declarations - 170 entries

Project standards demand the equal signs must be aligned for better readability.

  • Best score: 13
  • Best player score: 28
  • Position: #63 / 64
  • Number of attempts: 2
I forgot quotes - 15989 entries

Oops.

  • Best score: 10
  • Best player score: 15
  • Position: #2048 / 4181
  • Number of attempts: 1
Subtraction - 180 entries

Solve the equations.

  • Best score: 18
  • Best player score: 31
  • Position: #52 / 62
  • Number of attempts: 1
Count both ways - 1022 entries

Right AND down.

  • Best score: 13
  • Best player score: 16
  • Position: #154 / 354
  • Number of attempts: 1
Don't know what this is - 2022 entries

Replace contents of brackets with matching number of spaces. Don't ask what the format's supposed to be.

  • Best score: 11
  • Best player score: 14
  • Position: #290 / 585
  • Number of attempts: 1
Where should I put the Newline? - 881 entries

Help me put the newline.

  • Best score: 7
  • Best player score: 8
  • Position: #235 / 437
  • Number of attempts: 1
A HAPPY NEW YEAR 2014 ! - 10669 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Position: #316 / 3684
  • Number of attempts: 5
Words in parens - 12939 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 16
  • Position: #2008 / 3964
  • Number of attempts: 3
Word frequency alignment - 290 entries

You've got to align the second column, but the spacing is inconvenient and there are nasty tabs in the way. If you're a "real Vim ninja," this could be very quick indeed...

  • Best score: 5
  • Best player score: 5
  • Position: #16 / 161
  • Number of attempts: 1
Minimalist Limerick - 520 entries

Reproduce this lovely poem.

  • Best score: 30
  • Best player score: 36
  • Position: #87 / 174
  • Number of attempts: 2
Enumerate words - 254 entries

Enumerate the unique words in order.

  • Best score: 23
  • Best player score: 26
  • Position: #38 / 91
  • Number of attempts: 4
Circle in a square - 152 entries

Probably looks more like "Egg in a rectangle" in most fonts, but it's actually 23x23.

  • Best score: 23
  • Best player score: 55
  • Position: #38 / 54
  • Number of attempts: 1
Block Fun 1 - 210 entries

Manipulate the columns to produce desired result.

  • Best score: 14
  • Best player score: 19
  • Position: #25 / 75
  • Number of attempts: 5
Prefixes and suffixes - 635 entries

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

  • Best score: 17
  • Best player score: 27
  • Position: #103 / 201
  • Number of attempts: 2
abcd > a b c d - 291 entries

transform the single spaces into 4 spaces repeat for each line

  • Best score: 15
  • Best player score: 17
  • Position: #208 / 222
  • Number of attempts: 3
Python: Lots of function arguments - 119 entries

The function definition is too long for one line. The modeline helps you with some typical Python indent settings.

  • Best score: 6
  • Best player score: 15
  • Position: #29 / 50
  • Number of attempts: 1
Readable Rubyhash - 267 entries

Rubyists talk about being cutting edge but how many are using 1.9 in production? Time to convert those verbose 1.8 hashes in to symbolic, succinct 1.9 beauties!

  • Best score: 23
  • Best player score: 29
  • Position: #59 / 95
  • Number of attempts: 1
Checkerboard case pattern - 164 entries

All the squares are white. Make some of them black. But only the right ones.

  • Best score: 15
  • Best player score: 17
  • Position: #24 / 61
  • Number of attempts: 3
Shuffle and Sort - 229 entries

The values where sorted incorrectly. Get them back to how they are supposed to be

  • Best score: 17
  • Best player score: 29
  • Position: #59 / 67
  • Number of attempts: 2
The name of the game - 665 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Position: #66 / 360
  • Number of attempts: 1
lamb had a little Mary - 609 entries

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

  • Best score: 16
  • Best player score: 36
  • Position: #93 / 168
  • Number of attempts: 1
Stairs Indenting - 473 entries

Indent each line with <line number> whitespaces.

  • Best score: 12
  • Best player score: 14
  • Position: #88 / 197
  • Number of attempts: 1
Unwrap the text of an email message - 192 entries

Reverse of "Wrap the text of an email message to 79 characters". gq and gw are great for wrapping paragraphs. But sometimes other programs choke on your wrapped lines. What's the best way to un-gq?

  • Best score: 16
  • Best player score: 25
  • Position: #56 / 75
  • Number of attempts: 1
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: 32
  • Position: #414 / 480
  • Number of attempts: 3
Create an alphabet diamond - 105 entries

Here's a brain teaser to keep things interesting...

  • Best score: 37
  • Best player score: 88
  • Position: #26 / 32
  • Number of attempts: 1
Let's play some Ivmgolf - 1118 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 10
  • Position: #340 / 445
  • Number of attempts: 2
switch variable - 5071 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 12
  • Position: #787 / 1748
  • Number of attempts: 3
Shebangs for all - 1999 entries

We've all seen or used a shebang once or twice. Ditch the specific paths and leave just a dynamic Ruby and Python bath behind.

  • Best score: 11
  • Best player score: 14
  • Position: #221 / 516
  • Number of attempts: 2
Reformat most common surnames - 717 entries

Reformat copy-pasted table into a list of the most common surnames

  • Best score: 23
  • Best player score: 29
  • Position: #111 / 210
  • Number of attempts: 3
Remember FizzBuzz? - 725 entries

Output FizzBuzz to 100. Start with nothing.

  • Best score: 39
  • Best player score: 71
  • Position: #148 / 190
  • Number of attempts: 1
Get rid of html tags - 398 entries

Want to read more about Vim's background? Then get rid of those html tags...

  • Best score: 12
  • Best player score: 17
  • Position: #82 / 230
  • Number of attempts: 1
Change the content of a string - 1581 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 25
  • Position: #367 / 589
  • Number of attempts: 3
Sort and add attributes - 1454 entries

Sort the states and add the attribute country to each record.

  • Best score: 33
  • Best player score: 37
  • Position: #449 / 565
  • Number of attempts: 3
Reconstruct the Sentence - 1511 entries

Get the sentence back in the proper order, remove duplicate lines, and then combine the separate lines into one.

  • Best score: 20
  • Best player score: 21
  • Position: #202 / 413
  • Number of attempts: 2
Braces or Brackets? - 1018 entries

Someone forgot whether to use braces or brackets and you have to clean up their code!

  • Best score: 34
  • Best player score: 47
  • Position: #183 / 316
  • Number of attempts: 2
Flodder-challenge - 1263 entries

Replace the text the most efficient and win!

  • Best score: 27
  • Best player score: 33
  • Position: #111 / 336
  • Number of attempts: 3
Simple text editing with Vim - 12815 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #1012 / 3696
  • Number of attempts: 4
Reformat/Refactor a Golfer Class - 6984 entries

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

  • Best score: 28
  • Best player score: 37
  • Position: #526 / 1708
  • Number of attempts: 7
Lieven Keersmaekers
Twitter:

entered into 50 challenges

contributed 0 challenges