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 text editing with Vim - 9933 entries

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

  • Best score: 13
  • Best player score: 101
  • Number of attempts: 1
Ugly spreadsheet copy/paste to CSV - 679 entries

convert an ugly spreadsheet copy/paste into a CSV format.

  • Best score: 19
  • Best player score: 63
  • Number of attempts: 2
HTML to Haml - 667 entries

Help convert this HTML page to Haml.

  • Best score: 23
  • Best player score: 53
  • Number of attempts: 1
Reformat most common surnames - 511 entries

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

  • Best score: 23
  • Best player score: 49
  • Number of attempts: 1
Reformat/Refactor a Golfer Class - 5358 entries

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

  • Best score: 32
  • Best player score: 49
  • Number of attempts: 2
attr_aligner - 2795 entries

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

  • Best score: 19
  • Best player score: 44
  • Number of attempts: 3
Minimalist Limerick - 442 entries

Reproduce this lovely poem.

  • Best score: 31
  • Best player score: 40
  • Number of attempts: 1
Make Fancy Header - 880 entries

Make the header text stand out with surrounding asterisks

  • Best score: 16
  • Best player score: 16
  • Number of attempts: 5
Letter case trickery - 1413 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: 13
  • Number of attempts: 4
Stairs Indenting - 357 entries

Indent each line with <line number> whitespaces.

  • Best score: 12
  • Best player score: 13
  • Number of attempts: 4
Add fold markers to a .c file - 439 entries

Fold markers can make it easier to navigate source code. Add them to this .c file.

  • Best score: 30
  • Best player score: 126
  • Number of attempts: 1
Words in parens - 10374 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 25
  • Number of attempts: 2
A Simple One - 820 entries

Here is a very simple one - just to illustrate/introduce a vim feature that some people seem to miss...

  • Best score: 9
  • Best player score: 9
  • Number of attempts: 3
abcd > a b c d - 237 entries

transform the single spaces into 4 spaces repeat for each line

  • Best score: 15
  • Best player score: 15
  • Number of attempts: 1
A simple change - 351 entries

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

  • Best score: 12
  • Best player score: 14
  • Number of attempts: 1
A HAPPY NEW YEAR 2014 ! - 9081 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 7
Wrap the text of an email message to 79 characters - 473 entries

You're replying to an email with silly long lines. Clean them up.

  • Best score: 5
  • Best player score: 6
  • Number of attempts: 1
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: 24
  • Number of attempts: 1
Reconstruct the Sentence - 1004 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: 25
  • Number of attempts: 1
switch variable - 4095 entries

how fast can you switch two variable ?

  • Best score: 3
  • Best player score: 13
  • Number of attempts: 4
V to the i - 3564 entries

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

  • Best score: 7
  • Best player score: 8
  • Number of attempts: 2
The holy-grail may help - 295 entries

Can you find it in less than 20 strokes, Arthur?

  • Best score: 16
  • Best player score: 16
  • Number of attempts: 2
Search and Replace 0 - 3841 entries

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

  • Best score: 12
  • Best player score: 18
  • Number of attempts: 1
Hanging Indent for Footnotes - 57 entries

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

  • Best score: 17
  • Best player score: 25
  • Number of attempts: 2
vim = 22 / 7 - 392 entries

pi square vim

  • Best score: 20
  • Best player score: 40
  • Number of attempts: 2
quotes inside quotes - 2647 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: 16
  • Number of attempts: 3
Rotating Philosophers Problem - 346 entries

Can you help the philosophers find a good place to sit before they get five forks and spaghetti?

  • Best score: 29
  • Best player score: 32
  • Number of attempts: 3
Increment, increment, increment.... - 467 entries

Vim likes macros

  • Best score: 10
  • Best player score: 12
  • Number of attempts: 1
Generate English Alphabets - 389 entries

Start with a, get up to z.

  • Best score: 19
  • Best player score: 25
  • Number of attempts: 2
Python Hello World! Reformatting - 818 entries

A novice Python using prints Hello World! and a pro shows him different way. Using vim to get into pro style from novice, win the challenge.

  • Best score: 39
  • Best player score: 43
  • Number of attempts: 3
Line Zipper - 388 entries

Zip/pair related lines.

  • Best score: 12
  • Best player score: 16
  • Number of attempts: 1
The meaning - 488 entries

Numbers are fun!

  • Best score: 5
  • Best player score: 5
  • Number of attempts: 2
Remove semicolons after expressions - 429 entries

A follow-up for http://vimgolf.com/challenges/4fc9d767d3a0d4000100000e.

  • Best score: 6
  • Best player score: 6
  • Number of attempts: 2
Let's play some Ivmgolf - 864 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 9
  • Number of attempts: 3
Going underground.... - 277 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: 40
  • Number of attempts: 3
Delete unwanted lines - 330 entries

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

  • Best score: 9
  • Best player score: 9
  • Number of attempts: 1
Word frequency alignment - 195 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
  • Number of attempts: 2
Table Reshuffle - 314 entries

Fix the column order in this table... also append the new 'username' column.

  • Best score: 22
  • Best player score: 40
  • Number of attempts: 1
Reverse Simple Deletion - 694 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 3
Extract argument from function - 1816 entries

The aim is to see if you can do some refactoring very fast.

  • Best score: 13
  • Best player score: 16
  • Number of attempts: 2
Count both ways - 850 entries

Right AND down.

  • Best score: 13
  • Best player score: 16
  • Number of attempts: 1
VimGolfNight - 449 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 2
Prefixes and suffixes - 465 entries

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

  • Best score: 17
  • Best player score: 35
  • Number of attempts: 1
Remove noise from HTTP log - 595 entries

This piece of log (from the year 2000) contains some irrelevant data. We only want to see the HTTP method and resource.

  • Best score: 15
  • Best player score: 17
  • Number of attempts: 2
Sort entries based on date - 292 entries

Sort some entries in a Ledger-file based on date.

  • Best score: 11
  • Best player score: 18
  • Number of attempts: 1
Whitespace, empty lines and tabs - 2508 entries

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

  • Best score: 16
  • Best player score: 33
  • Number of attempts: 3
Make it more readable - 1718 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 19
  • Number of attempts: 3
Shebangs for all - 1552 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: 23
  • Number of attempts: 5
Mess in revision history - 927 entries

Help Joe clean up what Steve has cobbled.

  • Best score: 17
  • Best player score: 23
  • Number of attempts: 7
Numbering a List - 1698 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 25
  • Number of attempts: 3
NATO phonetic alphabet - 382 entries

Transform the series of words into a list.

  • Best score: 19
  • Best player score: 27
  • Number of attempts: 1
Assignment Alignment - 651 entries

line up the operators. Use spaces, not tabs.

  • Best score: 18
  • Best player score: 31
  • Number of attempts: 1
Switch function arguments - 1785 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 15
  • Number of attempts: 3
Vertical Limit - 2032 entries

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

  • Best score: 21
  • Best player score: 32
  • Number of attempts: 1
Saving the hashes(#) - 1686 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: 27
  • Number of attempts: 4
replacing each line of a block selection - 2398 entries

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

  • Best score: 17
  • Best player score: 34
  • Number of attempts: 2
Sort and add attributes - 1052 entries

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

  • Best score: 18
  • Best player score: 38
  • Number of attempts: 1
Felipe Jaramillo F
Twitter:

Entrepreneur and technologist. Owner of Aplyca. eZ Publish, web and mobile developmet. Lover of jazz and chocolate

entered into 57 challenges

contributed 0 challenges