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]

37432 active golfers, 446029 entries, 561 challenges

Open VimGolf challenges

New teacher - 91 entries

Update the details of the new CS teacher.

Truth Table to ModelSim - 26 entries

Convert this truth table to simulator instructions!

Replace word while reserving first letter case - 370 entries

Window -> Door window -> door Windows -> Windows windows -> windows

months to html list items - 551 entries

Turn the months into list items.

Instance creation in Verilog - 33 entries

Creating an instance of a module is a very frequent task in Verilog. Let's see how efficiently can it be done

Quicksort - 1558 entries

We need the numbers in the first row sorted as quickly as possible! Be careful not to disturb the data below the divider though: that must remain unchanged.

EDN reformat - 1047 entries

The goal is to make the code more readable and concise while maintaining its functionality.

Tic-Tac-Toe Grid Transformation - 319 entries

Your mission is to efficiently convert the original Tic-Tac-Toe grid, represented by 'x's and 'o's, into a neat and well-organized game board.

Pick and sort servers from mirror list - 344 entries

Retrieve the primary server for each country from a mirror list file and organize them alphabetically by country name. Given a mirror list file containing server information for various countries, the objective is to extract the primary server from each country and then arrange these servers in alphabetical order based on the respective country names.

Populate 3D bone names list - 450 entries

Ran into this at work, excited to see how this gets optimized

Remove line numbers - 540 entries


Find fix point of cos - 1125 entries

Write a function to find the fix point of cos. It is not a good code; It is just to use vim. Inspired by the excellent about the Y combinator.

Insert column data on Confluence-style table - 425 entries

Add ip addresses into new "IP" column based on the last digits from the "Server" column

Surround the 'z' character with brackets, quotes, and print as formatted string. - 485 entries

Surround the 'z' character with brackets, quotes, and print as formatted string.

Easier Align - 344 entries

Align the columns of a markdown table

Paste a column after a column - 2247 entries

This task is very common while using multi-cursor. What is the elegant vim way ?

Filter number combinations that don't add to 11 - 376 entries

Append the sum of each line to its end, alongside an equals sign, and remove any that do not sum to 11. The ordering of lines should stay the same. Note that the combinations are semi-arbitrary and not all 4-number combinations are present in the file.

Tabbed Table to Python Array - 643 entries

Not payed by the hour? So make it fast ;-) The table contains the relative occurencies of bigrams (two consecutive letters) in 1/100,000 in the german language, copy-pasted from

HS exam question - 1504 entries

Convert the data to a python dictionary

Reformat symbols in list - 1466 entries

Saw this in some lecture, easy reformatting using multiple cursor in VS Code

Fizzbuzz - 509 entries

type the first 100 lines of the fizzbuzz problem

Substraction (bis) - 578 entries

Solve the equations (adapted from the original @Caek_'s challenge).

Changing around text with citations - 322 entries

Based off of something I saw on reddit

Poorly indented Python comments - 1172 entries

Fix the alignment of some Python comments as quickly as possible.

Many duplicates - 1253 entries

Quick and easy

2 quick changes and a numbered list - 599 entries

The ascii will not be lost, but rather numbered in 4 digit blocks with leading zeros.

delete swap - 1522 entries

delete all swap

Generate a very basic Python constructor (fixed) - 1175 entries

Original by @BiddulphCaleb ( - had some extra spaces in output file.

Fix the shell script! - 2339 entries

Fix the shell script with the fewest keystrokes!

Visual block training - 1001 entries

You see the input. You see the output. Go.

Innocent Monster - 164 entries

You have the tools, just create him!

Put a newline after every 10 lines in vim - 1577 entries

Goal is to put a newline after every 10 lines in vim.

Java to JavaScript - 257 entries

Let convert some simple Java file to JavaScript!

Wikitext headings to markdown - 980 entries

Convert the wikitext headings to markdown.

hello-world-vimgolf - 2353 entries

Simple number generation

Contribute to keyboard mashing - 839 entries

Speak in tongues

Reordering Lorem Ipsum - 261 entries

Who even sorted this?

Solve anagram with ASCII letters - 39 entries

ASCII created by TOIlet command

Fill in the chess board - 905 entries

Fill in the name of each square using its file (a-h) and rank (1-8).

Learn to ask for :help - 531 entries

Learn to use the help to reduce your strokes...

Plotting some variables in python - 1558 entries

4 sets of (x,y) variables to plot. Just increment the numbers! Well, let's change the colors of the lines as well. Oh and we meant to plot the absolute values of course.

Transpose a python matrix - 837 entries

Rotate the matrix in 90 degrees.

Create a diamond comment - 314 entries

Encapsulate the text in a diamond pattern.

Lowercase first characters - 467 entries

This is the (abridged) input for Day 3 in Advent of Code 2019. The output is a format more suitable for Prolog programming: the two lines of input become two lists of pairs, joined together in a wires functor.

Make list of numbers from 1 to 30 more compact, but more confusing - 90 entries

Change the naming logic of numbers to end up with less lines.

Write Hello World in the 'i use arch btw' -programming language - 30 entries

> "I use Arch btw" is an esoteric programming language based on Brainfuck in which the Brainfuck commands have been replaced with the following keywords: i, use, arch, linux, btw, by, the, way.

Migrated to Postgres! - 312 entries

Celebration completion of this project.

Increment number for every 10 lines - 219 entries

The file consists of 2 columns (code and percentage). We need to add 2 more columns with increasing number for 4th column (Xcols) and increment 3rd column (Ycols) only for every 10 lines with reset of 4th column

simple replacements - 1658 entries

The goal is to see the replacement commands in action.

Inverting Lines - 1832 entries

A simple challenge to invert all lines, except the first.

VimGolf Chatter