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

Delete unwanted lines - 348 entries

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

  • Best score: 9
  • Best player score: 9
  • Number of attempts: 1
A simple change - 376 entries

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

  • Best score: 12
  • Best player score: 14
  • Number of attempts: 1
Remove noise from HTTP log - 624 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
Count both ways - 918 entries

Right AND down.

  • Best score: 13
  • Best player score: 16
  • Number of attempts: 1
Going underground.... - 303 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
Word frequency alignment - 215 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
Add fold markers to a .c file - 447 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
Shebangs for all - 1669 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 - 1074 entries

Help Joe clean up what Steve has cobbled.

  • Best score: 17
  • Best player score: 23
  • Number of attempts: 7
Search and Replace 0 - 4446 entries

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

  • Best score: 12
  • Best player score: 18
  • Number of attempts: 1
Remove semicolons after expressions - 499 entries

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

  • Best score: 6
  • Best player score: 6
  • Number of attempts: 2
Simple text editing with Vim - 11059 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 - 768 entries

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

  • Best score: 19
  • Best player score: 63
  • Number of attempts: 2
Minimalist Limerick - 494 entries

Reproduce this lovely poem.

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

Make the header text stand out with surrounding asterisks

  • Best score: 16
  • Best player score: 16
  • Number of attempts: 5
Extract argument from function - 2134 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
VimGolfNight - 471 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 2
NATO phonetic alphabet - 413 entries

Transform the series of words into a list.

  • Best score: 19
  • Best player score: 27
  • Number of attempts: 1
Python Hello World! Reformatting - 859 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
Sort and add attributes - 1113 entries

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

  • Best score: 33
  • Best player score: 38
  • Number of attempts: 1
Reverse Simple Deletion - 736 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 3
Hole-in-one - 963 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
Let's play some Ivmgolf - 975 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 9
  • Number of attempts: 3
Hanging Indent for Footnotes - 58 entries

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

  • Best score: 17
  • Best player score: 25
  • Number of attempts: 2
Reformat most common surnames - 538 entries

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

  • Best score: 23
  • Best player score: 49
  • Number of attempts: 1
A Simple One - 854 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
A HAPPY NEW YEAR 2014 ! - 10150 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 7
Generate English Alphabets - 425 entries

Start with a, get up to z.

  • Best score: 19
  • Best player score: 25
  • Number of attempts: 2
V to the i - 4377 entries

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

  • Best score: 7
  • Best player score: 8
  • Number of attempts: 2
Line Zipper - 402 entries

Zip/pair related lines.

  • Best score: 12
  • Best player score: 16
  • Number of attempts: 1
Vertical Limit - 2243 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
Reformat/Refactor a Golfer Class - 5694 entries

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

  • Best score: 32
  • Best player score: 49
  • Number of attempts: 2
Words in parens - 12083 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 25
  • Number of attempts: 2
Whitespace, empty lines and tabs - 2728 entries

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

  • Best score: 16
  • Best player score: 33
  • Number of attempts: 3
attr_aligner - 3245 entries

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

  • Best score: 19
  • Best player score: 44
  • Number of attempts: 3
Reconstruct the Sentence - 1038 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 function arguments - 1888 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 15
  • Number of attempts: 3
Make it more readable - 1812 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 19
  • Number of attempts: 3
Increment, increment, increment.... - 517 entries

Vim likes macros

  • Best score: 10
  • Best player score: 12
  • Number of attempts: 1
quotes inside quotes - 2946 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: 14
  • Best player score: 16
  • Number of attempts: 3
replacing each line of a block selection - 2694 entries

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

  • Best score: 18
  • Best player score: 34
  • Number of attempts: 2
abcd > a b c d - 248 entries

transform the single spaces into 4 spaces repeat for each line

  • Best score: 15
  • Best player score: 15
  • Number of attempts: 1
The meaning - 509 entries

Numbers are fun!

  • Best score: 5
  • Best player score: 5
  • Number of attempts: 2
Sort entries based on date - 305 entries

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

  • Best score: 11
  • Best player score: 18
  • Number of attempts: 1
Table Reshuffle - 326 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
Saving the hashes(#) - 1876 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
Numbering a List - 1764 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 25
  • Number of attempts: 3
Prefixes and suffixes - 526 entries

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

  • Best score: 17
  • Best player score: 35
  • Number of attempts: 1
The holy-grail may help - 302 entries

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

  • Best score: 16
  • Best player score: 16
  • Number of attempts: 2
switch variable - 4665 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 13
  • Number of attempts: 4
HTML to Haml - 757 entries

Help convert this HTML page to Haml.

  • Best score: 23
  • Best player score: 53
  • Number of attempts: 1
Rotating Philosophers Problem - 362 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
Wrap the text of an email message to 79 characters - 517 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
Letter case trickery - 1481 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
vim = 22 / 7 - 408 entries

pi square vim

  • Best score: 20
  • Best player score: 40
  • Number of attempts: 2
Stairs Indenting - 384 entries

Indent each line with <line number> whitespaces.

  • Best score: 12
  • Best player score: 13
  • Number of attempts: 4
Assignment Alignment - 722 entries

line up the operators. Use spaces, not tabs.

  • Best score: 18
  • Best player score: 31
  • 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