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]

39587 active golfers, 470522 entries, 603 challenges

Open VimGolf challenges

Pick and sort servers from mirror list - 421 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 - 623 entries

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

Remove line numbers - 716 entries

From http://web.archive.org/web/20140831121704/http://dirac.org/linux/gdb/02a-Memory_Layout_And_The_Stack.php#investigatingthestackwithgdb.

Find fix point of cos - 1392 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 https://mvanier.livejournal.com/2897.html about the Y combinator.

Insert column data on Confluence-style table - 450 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. - 551 entries

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

Easier Align - 394 entries

Align the columns of a markdown table

Paste a column after a column - 2526 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 - 406 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 - 721 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 http://www.mathe.tu-freiberg.de/~hebisch/cafe/kryptographie/bigramme.html

HS exam question - 1578 entries

Convert the data to a python dictionary

Reformat symbols in list - 1614 entries

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

Fizzbuzz - 557 entries

type the first 100 lines of the fizzbuzz problem

Substraction (bis) - 588 entries

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

Changing around text with citations - 329 entries

Based off of something I saw on reddit

Poorly indented Python comments - 1315 entries

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

Many duplicates - 1445 entries

Quick and easy

2 quick changes and a numbered list - 647 entries

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

delete swap - 1776 entries

delete all swap

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

Original by @BiddulphCaleb (http://www.vimgolf.com/challenges/6019f1c4642668000cee11e8) - had some extra spaces in output file.

Fix the shell script! - 2544 entries

Fix the shell script with the fewest keystrokes!

Visual block training - 1070 entries

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

Innocent Monster - 217 entries

You have the tools, just create him!

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

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

Java to JavaScript - 267 entries

Let convert some simple Java file to JavaScript!

Wikitext headings to markdown - 987 entries

Convert the wikitext headings to markdown.

hello-world-vimgolf - 2499 entries

Simple number generation

Contribute to keyboard mashing - 890 entries

Speak in tongues

Reordering Lorem Ipsum - 290 entries

Who even sorted this?

Solve anagram with ASCII letters - 54 entries

ASCII created by TOIlet command

Fill in the chess board - 958 entries

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

Learn to ask for :help - 587 entries

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

Plotting some variables in python - 1661 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 - 873 entries

Rotate the matrix in 90 degrees.

Create a diamond comment - 337 entries

Encapsulate the text in a diamond pattern.

Lowercase first characters - 487 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 - 107 entries

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

Write Hello World in the 'i use arch btw' -programming language - 31 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. https://github.com/OverMighty/i-use-arch-btw

Migrated to Postgres! - 323 entries

Celebration completion of this project. https://github.com/igrigorik/vimgolf/pull/322

Increment number for every 10 lines - 230 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 - 1753 entries

The goal is to see the replacement commands in action.

Inverting Lines - 1892 entries

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

CSV to MD format - 413 entries

To convert a CSV list to Markdown list

Generate a very basic Python constructor - 316 entries

I actually needed to do this myself, so I look forward to learning how.

Python dataclasses - 1127 entries

Simple challenge to extract fields from a Python class

Count to 100 in word form - 138 entries

Write all the numbers from 1 to 100, using their word forms rather than the digit form. Most of the parts you will need are included in the input file. Use hyphens when appropriate.

RUST HTML to maud. - 24 entries

RUST HTML to maud. maud is one of the template engines for server-side rendering based on rust. rusty practice on vimgolf

RUST Cargo.toml version to last - 355 entries

RUST Cargo.toml version to last. rusty practice on vimgolf

대법원 인명용 한자 바인딩(Combine Hangul and Chinese characters) - 28 entries

The character system of Chinese characters has caused difficulties in character encoding for a long time. The content is to link the Korean name and the corresponding Chinese character. input is simply pasted Chinese table, and you need to make it in json format. Most of them are omitted because there are too many Chinese characters, but I think it's better to work from "가" to "힐". There are a few rules here. 1. One Hangul must correspond to multiple Chinese characters. 2. In the case of "a(b c)", "a" is a redundant Chinese character, so you must remove "a" and use only "b c". 3. There are some characters here that don't appear to be an encoding issue, but they should all be used. 4. Should follow json format, Chinese characters are arrays. 문자인코딩의 역사속에서 한문은 여러가지 난제를 만들어왔습니다. 이 문제는 대법원 인명용 한자를 바인딩하는 것입니다. input은 단순히 인명용한자 표를 붙여넣기 한 것이며, 이것을 json형식으로 만들어야합니다. 한자가 너무 많은 관계로 대부분을 생략하였으나, 기본적으로 "가"부터 "힐"까지 모두 동작하는 것이 좋다고 생각합니다. 여기에는 몇가지 규칙이 있습니다. 1. 한글 하나에는 여러개의 한자가 대응합니다. 2. "a(b c)"같은 경우 "a"는 중복된 한자이므로, "a"를 제거하고 "b c"만을 사용해야합니다. 3. 몇몇 한자는 인코딩의 문제로 보이지 않을 수 있습니다. 그러나 모두 사용해야합니다. 4. json형식을 따르며, 한자는 배열입니다.

RUST match with enum for Coin - 183 entries

RUST match with enum for Coin rusty practice on vimgolf

VimGolf Chatter