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]

26785 active golfers, 308956 entries, 462 challenges

Open VimGolf challenges

Restore order to the alphabet - 155 entries

The numbers are OK. The letters are wonky.

The holy-grail may help - 301 entries

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

Readable Rubyhash - 232 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!

A grid of punctuation - 112 entries

Create a checkerboard of = and - in an 80×24 grid!

Label grid cells (6x6) - 13 entries

Label the cells of a grid with its coordinates. Rows are labelled top to bottom from A to F, and columns left to right from A to F. Each cell has a coordinate MN, where M is the row letter and N is the column letter.

Wget failed to download redirections - 162 entries

Output of a wget session, where 302 where not properly handled due to certificate problems, has been saved to a file. Keep the correct URLs to start again downloading.

Enumerate words - 225 entries

Enumerate the unique words in order.

[Real World] PHP To Markdown - 25 entries

Fun refactoring I had to do in the real world. This presents several challenges: - How to create a table that fits the informations exactly - How to keep track of two informations per line while doing the refactoring - Generate the link from the actual text Have fun!

remove all lines in first part - 149 entries

From the second part, remove all lines in the first part. It can be useful when you have done something from a long list, you want to know what is not done yet!

Prime Numbers - 282 entries

List the first 100 prime numbers.

Alphabetize the directory - 260 entries

Put the contacts and their information in alphabetical order.

Compile C - 279 entries

You might have to get clever to do this one.

Suffix sort - 166 entries

Sort from the end of the line, as if the letters in each line were reversed.

The D a n k Side of the Moon - 28 entries

You're making a vaporwave cover of The Dark Side of the Moon. So for the tracklisting, you want to: 1. Change the track names to v a p o r c a s e 2. Double the track lengths (since you're slowing them down). Well... let's just double the minutes.

Create Leading Zeros - 192 entries

Create leading zeros only for id columns. Please use generic approach!

Free hyphen! - 117 entries

Just like "Inner hyphens", but I'm giving you a free hyphen to play with. Will your solution be any different?

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.

Number an outline - 199 entries

The indent and words are right, but the numbers are all wrong.

Inner hyphens - 114 entries

Yet another hyphen challenge. Adding 5 hyphens to a file shouldn't be too hard.

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

82 bottles of beer on the wall - 263 entries

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

Change attribute to getter - 88 entries

Wrap attributes with a getter method.

expand a list comprehension (python) - 251 entries

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

increment by column in XML - 140 entries

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

Top X - 181 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.

Simple Maths 2 - 17 entries

Time to practice expression register! #maths #linear

Subtraction - 147 entries

Solve the equations.

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.

Round Round - 240 entries

Round Round

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.

Python to Ruby - 188 entries

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

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!

Pascal's Triangle - 21 entries

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

Sort the cardinal numbers - 222 entries

Maybe a simple challenge.

Recursively Palindrome - 220 entries

Note that there are 2^6-1 characters.

Pretty format for variable declarations - 128 entries

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

create arrows in a list - 65 entries

Add arrow at same distance

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.

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?

citizen_hacks_2019_part1 - 9 entries

For the Citizen Hacks 2019 Vim competition

Generate Fibonacci Numbers - 209 entries

Use your super vim powers to generate Fibonacci Numbers.

Refactor arguments into object argument - 158 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

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_".

NBCU Weekly Challenge - #0 - 121 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!

Fun With The Diagonal - 86 entries

change the lowercase characters on the main diagonal to uppercase

Cartesian product - 201 entries

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

VimGolf Chatter