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]

25093 active golfers, 278571 entries, 436 challenges

Open VimGolf challenges

Deleting folded text - 274 entries

The text below contains three folds. Delete them (and the text inside them). For example: 123 456 /*{{{*/ 789 /*}}}*/ 012 Should become: 123 012 Also, add `aoeuaoeu` to make sure small solutions don't get flagged as cheating.

Alphabetize the directory - 252 entries

Put the contacts and their information in alphabetical order.

Prime Numbers - 263 entries

List the first 100 prime numbers.

create arrows in a list - 65 entries

Add arrow at same distance

increment by column in XML - 139 entries

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

Word frequency alignment - 197 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...

Sorting a glossary - 101 entries

Sort a glossary. Glossary head contains a header phrase ending with ':' and glossary body has multi line text indented with a tab.

Subtraction - 147 entries

Solve the equations.

Extract HTML option values from tag values - 73 entries

Generate HTML option values from the text in the option tag. If the text contains multiple words, replace the spaces with an underscore and convert all capital letters to small letters.

Change name of a variable - 146 entries

Replace the name of the $variable with the fastest move possible. The challenge is having a command that allow you to easily change the variable name even if its indented.

Top X - 177 entries

The End File is the Top 10 Vimgolf Leaderboard at June 29, 2013. This is a second version, with a great contribution of @udioica. X is ten in Roman,a numeric system in ancient Rome

Fix the Haiku - 247 entries

Change this slightly scrambled haiku to its unscrambled form and fix the capitalisation and punctuation along the way.

Kolakoski sequence -- level 2 - 9 entries

This time, the line above describes the line below. Level 1 at: http://www.vimgolf.com/challenges/5c880211ab65cb00065c74eb

Interleave lines - 125 entries

This is some kind of « paste -d'\n' c b a ». There are many ways to achieve this.. just find the shortest!

82 bottles of beer on the wall - 243 entries

Take them down. (sorry, only 82 bottles because the problem size is limited!)

expand a list comprehension (python) - 240 entries

Please show your way to convert a list comprehension in python to an ordinary for-loop expression!

Round Round - 240 entries

Round Round

Python to Ruby - 188 entries

Convert this Python code to Ruby. NOTE: This program likely won't run.

Format java properties - 63 entries

Format java properties to a different format. The value which is the string following the first '=' cannot & should not change. All periods in the key get replaced with an underscore "_" and get a prefix of "b_".

Pretty format for variable declarations - 128 entries

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

Recursively Palindrome - 220 entries

Note that there are 2^6-1 characters.

Sort the cardinal numbers - 215 entries

Maybe a simple challenge.

Cleanining up 80 column concatenated text - 184 entries

1. Put the whole query on one line, remove the concatenation operators 2. Remove the double spaces that appear a few times in the query 3. Use string-interpolated variable statementPid rather than the ugly concatenation

Java Array2List - 214 entries

Convert an java array initializer into a list.

Parsing with CSV: Unify lines and result. - 162 entries

col1;col2;col3;col4 A;1;4;5 A;3;4; A;1;4; # New output: col1;col2;col3;col4 A;1(2x);3;4(3x);5 any ideas?

Fun With The Diagonal - 85 entries

change the lowercase characters on the main diagonal to uppercase

Manual SQL - 93 entries

Change select and insert queries to simulate inserting a new record.

Refactor arguments into object argument - 156 entries

A relatively common Javascript refactoring.

Shuffle and Sort - 171 entries

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

Test everything! - 111 entries

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

NBCU Weekly Challenge - #0 - 118 entries

One of our favorites lines here at NBCU! p.s. The first version of #0 was deleted due to me copy/pasting a HTML entity. Congrats to the one who figured that out, you are a true ninja warrior!

Assign list - 145 entries

Assign list elements to matrix

Block Fun 1 - 158 entries

Manipulate the columns to produce desired result.

Cartesian product - 201 entries

{1,2,3,4,5} X {1,2,3,4,5}

Winning streak - 105 entries

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

Generate Fibonacci Numbers - 200 entries

Use your super vim powers to generate Fibonacci Numbers.

Another Mixed-Up Haiku - 196 entries

VimGolf ... a perfect evening?

Separating firstname & lastname - 102 entries

Seperate named with equal tabs.

It'ss tooo coold too typpe todaay - 194 entries

My hands are numb with cold. It's hard to type correctly.

Dehamlizing - 155 entries

Change this piece of HAML code back into erb

ASCII Art - 75 entries

how good are you with simple regex?

PHP <--> Java class conversion Part 1 - 178 entries

Convert this tiny php class to adequate java one.

Back to the roots - 36 entries

Johnny has a file with more integers. He wants to change each number with its square root. Can you help him?

42-header - 36 entries

Rush 42mexican-standoff at 42 school

Hidden Message - 44 entries

Find the hidden message and replace all other characters with spaces.

Piphilology - 114 entries

Piphilology comprises the creation and use of mnemonic techniques to remember a span of digits of the mathematical constant π. http://en.wikipedia.org/wiki/Piphilology

constructor - 161 entries

coding a constructor for a simple class

Aligning function arguments to match a specific coding style - 151 entries

Most projects have specific coding style guidelines. In this case, the argument list must be broken into a new line for each argument, with the argument names right aligned, taking into account pointers.

swap or reverse - 88 entries

Try to swap or reverse the line as needed.

Turn this csv list into queries - 182 entries

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

VimGolf Chatter