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]

24793 active golfers, 274565 entries, 433 challenges

Open VimGolf challenges

Add semicolons - 790 entries

Simply add a semicolon at the end of each line

Box it - 2429 entries

Create a box around a line.

Simple, Practical, and Common - 24508 entries

Simple things we do all the time should be able to be done with very few keystrokes, but sometimes I find something I need to do makes me go, "There MUST be a better way." This challenge is just a simple movement and entering text at a certain place.

Reorder the groups - 250 entries

Change the order so that the groups of fruit come before the vegetables.

simple format - 2607 entries

make it look better.

One number per line - 12472 entries

Just give me the numbers.

remove lines containing the word "reader" - 1457 entries

easy stuff

I forgot quotes - 11591 entries

Oops.

ninja substitution - 425 entries

How can you reuse a previous substitution ?

Applying same text modification in several lines - 1561 entries

Remove identical text at the beginning of several lines and the closing parenthesis.

Com(m)a Trouble - 1623 entries

Someone was real stupid when placing his commas. Can you fix it?

One to Ten - 849 entries

Generate the sequence of numbers from 1 to 10, one number per line. Inspired by this Reddit thread: https://redd.it/ak4it2

Just the middle - 9090 entries

Delete the instructions at the top and bottom.

html paragraph to table - 330 entries

reformat html paragraph to table

Remove quotes after first field - 67 entries

Remove the quotes around each field except for the first field.

Join 'em - 95 entries

This shouldn't be too tough

Words in parens - 10940 entries

We should all ace this, right?

A HAPPY NEW YEAR 2014 ! - 9440 entries

A HAPPY NEW YEAR 2014 !

Swap values inside brackets - 1415 entries

Easy challenge.

Around the clock - 81 entries

You'll want to use 2 special commands to complete this. If you haven't yet, read through 'input.txt', especially :help simple-changes

Vice versa - 5884 entries

Little role switching.

Two pairs of cluster of letters creates word - 386 entries

Clean and group.

Cool or not? - 422 entries

abc trying to be cool or not...

Tables, Functions, Sprocs - 50 entries

In order to load some scripts into my database in the correct order I need to load tables first (t_), then functions (fn_), then stored procedures (sp_). The order of the t_ lines and the order of the sp_ lines should also match. Reorder the lines so they will load correctly.

Increment each number - 445 entries

Increment each number individually by one

Simple text editing with Vim - 10354 entries

Make the pairs of lines match up by making each second line same as first

Swap values - 3483 entries

Well, swap the values...

Basic renumbering - 4571 entries

Renumbering Basic.

Delete to the end of the current line - 423 entries

Delete to the end of the current line, but keep the character under the cursor.

Team names - 1416 entries

The team names are misspelled.

Collect List - 3443 entries

Convert to comma separated list.

If-then-else regexp - 32 entries

Rules: - golf is never following golf - vim comes first! Drawing a finite-state machine diagram could help. #regexp

Put the months in order - 403 entries

Our contractor thought that months should be in alphabetical order. Put them in calendar order please.

Array transposition - 1572 entries

Transpose two arrays into one.

V to the i - 3874 entries

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

Change part of a function name in multiple occurrences - 374 entries

Change the middle part of the function name in multiple places, preferably using the next and dot commands.

Every other line - 2076 entries

AaAaAaA

convert yml into java pojo field - 637 entries

How fast vim can create fields for java pojo i.e class declaration referring to a (simple) yml file

Copy three lines - 2002 entries

If the site is up (by some miracle), make the text under every header identical.

move titles next to url, in quotes - 265 entries

had trouble with something similar

Reformat/Refactor a Golfer Class - 5470 entries

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

Split line with dots - 1802 entries

This line is too long, split it.

multiple cursor alternative - 1052 entries

from: https://www.reddit.com/r/vim/comments/6w5pfa/crosspost_from_remacs_how_would_you_do_this_in_vim/

switch variable - 4286 entries

how fast can you switch two variable ?

-a-b-c- - 2551 entries

Put hyphens everywhere.

From argument to object - 1073 entries

This task typifies those programmers endure while coding. This C-family pseudocode needs a function argument to be repurposed as an object call. Simply search and replace? Repeat a pattern of edits?

attr_aligner - 2968 entries

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

Build a six - 193 entries

Just enjoy building "a" floors...

Rule 110 - 23 entries

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

Search and Replace 0 - 4065 entries

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

VimGolf Chatter