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]

29248 active golfers, 350572 entries, 493 challenges

Open VimGolf challenges

Subtraction - 151 entries

Solve the equations.

Rule 110 - 32 entries

Compute the next 5 iterations of Rule 110 with the given starting state. https://en.wikipedia.org/wiki/Rule_110

On Being Stylish - 51 entries

Your PR cannot be accepted if you don't follow our corporate style guide.

Python to Ruby - 188 entries

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

simple format (3) - 43 entries

reverse two column values!

Recursively Palindrome - 222 entries

Note that there are 2^6-1 characters.

Interleave lines - 127 entries

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

Java Array2List - 216 entries

Convert an java array initializer into a list.

Sorting a glossary - 103 entries

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

Cleanining up 80 column concatenated text - 185 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

snowflake fractal - 36 entries

From step 0 to step 3 of a fractal

Pretty format for variable declarations - 129 entries

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

Generate Fibonacci Numbers - 211 entries

Use your super vim powers to generate Fibonacci Numbers.

Parsing with CSV: Unify lines and result. - 163 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?

Cartesian product - 206 entries

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

Another Mixed-Up Haiku - 206 entries

VimGolf ... a perfect evening?

Refactor arguments into object argument - 159 entries

A relatively common Javascript refactoring.

Shuffle and Sort - 172 entries

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

citizen_hacks_2019_challenge3 - 22 entries

For the Citizen Hacks 2019 Vim competition.

Block Fun 1 - 160 entries

Manipulate the columns to produce desired result.

It'ss tooo coold too typpe todaay - 199 entries

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

NBCU Weekly Challenge - #0 - 124 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 - 146 entries

Assign list elements to matrix

Extract HTML option values from tag values - 74 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.

Complete the hex array data - 188 entries

Do not use external tools(e.g. tac, seq) [My interpretation of Rule #7]

Fun With The Diagonal - 90 entries

change the lowercase characters on the main diagonal to uppercase

Unwrap the text of an email message - 154 entries

Reverse of "Wrap the text of an email message to 79 characters". gq and gw are great for wrapping paragraphs. But sometimes other programs choke on your wrapped lines. What's the best way to un-gq?

create arrows in a list - 65 entries

Add arrow at same distance

Multiplication table. - 183 entries

Create a multiplication table.

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

Convert this tiny php class to adequate java one.

Turn this csv list into queries - 190 entries

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

Test everything! - 113 entries

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

Getters & Setters: Java - 189 entries

Boilerplate getters & setters - it's a tedious fact of life in Java, and probably the only thing that still pulls me back to an IDE. Perhaps someone knows a fast, pure vim way...

Aligning function arguments to match a specific coding style - 160 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.

Dehamlizing - 156 entries

Change this piece of HAML code back into erb

Manual SQL - 94 entries

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

Create a pandoc compatible table - 158 entries

In [this vimcast][1], a featured gist from Tim Pope shows how to quickly make a simple table structure. How fast can you convert it to pandoc's markdown style? [1]: http://vimcasts.org/episodes/aligning-text-with-tabular-vim/

constructor - 165 entries

coding a constructor for a simple class

Piphilology - 123 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

Separating firstname & lastname - 107 entries

Seperate named with equal tabs.

The D a n k Side of the Moon - 30 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.

formatted text to markdown - 175 entries

You're converting some posts from an old blog to markdown. The formatted text is far closer to the finished product than the html markup, so it seems like a good place to start. Word wrapping seems to be the main area for optimization.

Winning streak - 105 entries

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

swap or reverse - 98 entries

Try to swap or reverse the line as needed.

Inconsistent real estate paste - 152 entries

Format a hand-typed real estate listing that uses inconsistent punctuation into four sections

Hidden Message - 59 entries

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

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

SFD-ROC: The Quick Brown Fox - 145 entries

Someone has vandalized our text (again). Please fix to read: The Quick Brown Fox Jumps Over The Lazy Dog.

REDRUM - 139 entries

If you remember "The Shinning", the first time you saw the bloody word REDRUM you probably thinked "What the Hell is that?" Well, then you know that you need a little help from a looking-glass to make sense of it. Now it's time to use vim like a mirror to reveal the message.

Groups magic - 139 entries

Regexp or macros for string converting: (a) -> ___ (abc) -> ____ (abcd) -> ______ All in the '(' replace to _ multiply by char count + ()

VimGolf Chatter