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]

24378 active golfers, 268013 entries, 424 challenges

Open VimGolf challenges

Adam's challenge - 742 entries

Change both normal to bold and 4 by 2. Adam Wathan challenge this on twitter . He did it in 11 keystrokes on Sublime.

Don't know what this is - 1711 entries

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

Missing Library and a Typo - 654 entries

I forgot to add a c library, please add it for me. Also I'm bad at typing so fix my typo too.

replacing each line of a block selection - 2475 entries

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

Learn some german verbs - 381 entries

The list needs to be structured so we can print in verbatim and feel ok about how it looks.

Triangular Numbers - 48 entries

Generate the first 50 triangular numbers.

Fiddle percentages into real numbers - 705 entries

Get rid of the '%' symbols and shift the decimal place. This is the easier version - all the columns line up.

Space out the alphabet - 1338 entries

Put 3 spaces between adjacent letters.

Letterbox - 68 entries

Make a box!

Vertical Limit - 2097 entries

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

Whitespace, empty lines and tabs - 2529 entries

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

Order and join - 728 entries

There's something special about the input order.

Flip the bit - 68 entries

Change the specific 0 to a 1.

Saving the hashes(#) - 1709 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.

Align commas - 820 entries

There are 15,000 aligning challenges on vimgolf.com, and they're all exactly the same. I hope this one is a little different.

Switch function arguments - 1815 entries

How to switch two arguments of a function.

Swap the operands under comparison - 203 entries

Swap the operands under comparison to prevent null pointer exception (at least in java)

comments galore - 896 entries

Basic comment reformatting

Letter case trickery - 1426 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.

Number Sort - 235 entries

sort the list of newline-separated numbers incrementally. Numbers are in the range 1 to 1000, with 500 missing

Make it more readable - 1738 entries

Insert blank lines to make it more organized and readable

unknown command - 107 entries

I want change 5 words

Make HTML List - 875 entries

Turn the comma separated list into an unordered html list.

Scrambled numbers - 715 entries

Four is NOT 1. One is 1.

C Reformatting - 617 entries

You may use Visual mode... or not. #uppercase

Numbering a List - 1719 entries

Pretty simple, number the list.

Do you demand a shrubbery? - 1001 entries

Use :redir and crush the emacsgolfers.

Fix the XML - 845 entries

The challenge consists in having a valid xml from an incomplete source.

Python challenge - 79 entries

Change the types of the variables in the list from str to float, while keeping the truncation.

SFD-ROC: vimvimvim - 1265 entries

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

Shebangs for all - 1574 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.

Kolakoski sequence -- level 1 - 36 entries

Generate the Kolakoski sequence as described by its first 75 terms.

Count both ways - 859 entries

Right AND down.

Mess in revision history - 950 entries

Help Joe clean up what Steve has cobbled.

Array Transposition - 129 entries

Transpose four arrays into two.

Mirror Symmetry - 694 entries

Add backslashes.

camel riding - 680 entries

add a prefix on some camelCase variables

Where should I put the Newline? - 788 entries

Help me put the newline.

Hole-in-one - 935 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.

remove dupes from array - 1190 entries

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

Array propagate - 227 entries

Complete the array with the keys as part of the value

From A to B - 487 entries

Mirror and change this text block

Todo list specification - 288 entries

The every item on the todo list must be done today. Modify the list to reflect that.

Condensed Cases - 675 entries

Apple's new programming language, Swift, allows two style of case statements: 1) one Enum case on each line, or 2) multiple Enum cases on a single line. Convert the following from the first case (no pun intended) to the second type.

Change the content of a string - 1222 entries

This docstring is a complete lie. Fix it.

Paragraph breaks - 392 entries

Swap the blank lines and the aaa lines.

Remember VimGolf Rules ! - 195 entries

Rules, ... and don't forget !

Alsa configuration - 459 entries

I'm tweaking my ~/.asoundrc file!

Let's play some Ivmgolf - 890 entries

Oops, I spelled that wrong.

Pascal's Triangle - 19 entries

Generate the first 17 left-justified rows of Pascal's triangle.

VimGolf Chatter