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]

Played Challenges

months to html list items - 1098 entries

Turn the months into list items.

  • Best score: 22
  • Best player score: 27
  • Position: #165 / 299
  • Number of attempts: 1
Paste a column after a column - 2620 entries

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

  • Best score: 14
  • Best player score: 37
  • Position: #454 / 568
  • Number of attempts: 1
Filter number combinations that don't add to 11 - 417 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.

  • Best score: 27
  • Best player score: 28
  • Position: #54 / 120
  • Number of attempts: 3
HS exam question - 1596 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 67
  • Position: #174 / 418
  • Number of attempts: 1
Reformat symbols in list - 1635 entries

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

  • Best score: 24
  • Best player score: 29
  • Position: #185 / 352
  • Number of attempts: 2
Fizzbuzz - 586 entries

type the first 100 lines of the fizzbuzz problem

  • Best score: 44
  • Best player score: 75
  • Position: #81 / 169
  • Number of attempts: 1
Substraction (bis) - 621 entries

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

  • Best score: 21
  • Best player score: 31
  • Position: #62 / 115
  • Number of attempts: 4
Changing around text with citations - 340 entries

Based off of something I saw on reddit

  • Best score: 28
  • Best player score: 46
  • Position: #75 / 94
  • Number of attempts: 1
Poorly indented Python comments - 1328 entries

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

  • Best score: 15
  • Best player score: 24
  • Position: #91 / 223
  • Number of attempts: 2
Many duplicates - 1459 entries

Quick and easy

  • Best score: 7
  • Best player score: 8
  • Position: #221 / 476
  • Number of attempts: 3
delete swap - 1814 entries

delete all swap

  • Best score: 5
  • Best player score: 5
  • Position: #227 / 565
  • Number of attempts: 2
Generate a very basic Python constructor (fixed) - 1277 entries

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

  • Best score: 29
  • Best player score: 50
  • Position: #186 / 274
  • Number of attempts: 1
Put a newline after every 10 lines in vim - 1664 entries

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

  • Best score: 10
  • Best player score: 11
  • Position: #63 / 559
  • Number of attempts: 5
Wikitext headings to markdown - 1003 entries

Convert the wikitext headings to markdown.

  • Best score: 20
  • Best player score: 20
  • Position: #14 / 210
  • Number of attempts: 8
hello-world-vimgolf - 2507 entries

Simple number generation

  • Best score: 10
  • Best player score: 10
  • Position: #112 / 714
  • Number of attempts: 3
Contribute to keyboard mashing - 898 entries

Speak in tongues

  • Best score: 17
  • Best player score: 20
  • Position: #179 / 272
  • Number of attempts: 2
Lowercase first characters - 490 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.

  • Best score: 33
  • Best player score: 33
  • Position: #17 / 184
  • Number of attempts: 4
simple replacements - 1829 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 19
  • Position: #71 / 394
  • Number of attempts: 9
Inverting Lines - 1932 entries

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

  • Best score: 10
  • Best player score: 10
  • Position: #137 / 518
  • Number of attempts: 3
CSV to MD format - 429 entries

To convert a CSV list to Markdown list

  • Best score: 36
  • Best player score: 61
  • Position: #39 / 96
  • Number of attempts: 1
Making 3 line function a one liner. - 340 entries

Simple challenge for frequent action while programming.

  • Best score: 4
  • Best player score: 4
  • Position: #75 / 209
  • Number of attempts: 2
Put a cross in the square - 235 entries

Put a cross in the square

  • Best score: 20
  • Best player score: 22
  • Position: #36 / 92
  • Number of attempts: 3
swap number pairs - 2140 entries

Swap the numbers in a bunch of 2-element arrays.

  • Best score: 16
  • Best player score: 27
  • Position: #215 / 389
  • Number of attempts: 2
HS Final exam vimgolf - 912 entries

Change the initial file to a single line containing all names comma-separated with numbers inside parentheses.

  • Best score: 21
  • Best player score: 32
  • Position: #157 / 240
  • Number of attempts: 3
Easy modification of ssh config - 382 entries

Just add another alias to each worker

  • Best score: 24
  • Best player score: 24
  • Position: #23 / 115
  • Number of attempts: 5
Python: Def to Lambda - 460 entries

LAMBDA!!!

  • Best score: 19
  • Best player score: 22
  • Position: #118 / 157
  • Number of attempts: 2
Rural Post - 4567 entries

Simple challenge to remove all but the post code on each line

  • Best score: 9
  • Best player score: 13
  • Position: #651 / 1114
  • Number of attempts: 2
Multiline to Single Line - 737 entries

Convert a multiline, indented file to a single line with no whitespace

  • Best score: 5
  • Best player score: 5
  • Position: #109 / 313
  • Number of attempts: 3
Get mail address from outlook format - 649 entries

Create a mail list space separated of mail list formatted by outlook

  • Best score: 15
  • Best player score: 31
  • Position: #193 / 204
  • Number of attempts: 1
prepend * to every non-blank line - 6358 entries

Prepend an asterisk to every non-blank line in the input file.

  • Best score: 10
  • Best player score: 11
  • Position: #755 / 1551
  • Number of attempts: 7
One number per line - 18811 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 16
  • Position: #1043 / 3883
  • Number of attempts: 2
Separate the lines - 191 entries

Every other line is mixed up. Separate them into their original texts.

  • Best score: 11
  • Best player score: 11
  • Position: #50 / 95
  • Number of attempts: 6
Add semicolons - 10905 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 11
  • Position: #1736 / 3079
  • Number of attempts: 4
remove lines containing the word "reader" - 3619 entries

easy stuff

  • Best score: 9
  • Best player score: 9
  • Position: #492 / 1175
  • Number of attempts: 5
Simple addition - 332 entries

The right side of the equation is already there. We just need the left one now.

  • Best score: 12
  • Best player score: 12
  • Position: #51 / 124
  • Number of attempts: 5
Array of characters - 175 entries

We all copy paste things off the internet, but the syntax doesn't look right. Fix it as fast as possible.

  • Best score: 33
  • Best player score: 52
  • Position: #43 / 47
  • Number of attempts: 1
Generate a list of numbers - 299 entries

Please generate list of numbers from 1 to 20.

  • Best score: 14
  • Best player score: 15
  • Position: #114 / 141
  • Number of attempts: 3
Line under headers - 2072 entries

Put a line under each header, and remove the other markdown formatting.

  • Best score: 24
  • Best player score: 24
  • Position: #16 / 510
  • Number of attempts: 6
Separating firstname & lastname - 154 entries

Seperate named with equal tabs.

  • Best score: 19
  • Best player score: 23
  • Position: #26 / 58
  • Number of attempts: 1
Simple format (2) - 335 entries

try again!

  • Best score: 23
  • Best player score: 38
  • Position: #58 / 70
  • Number of attempts: 2
camel riding - 793 entries

add a prefix on some camelCase variables

  • Best score: 15
  • Best player score: 15
  • Position: #74 / 281
  • Number of attempts: 5
Config Sections - 53 entries

Section me!

  • Best score: 43
  • Best player score: 46
  • Position: #9 / 20
  • Number of attempts: 3
Square numbers - 123 entries

Boring math puzzle.

  • Best score: 16
  • Best player score: 25
  • Position: #21 / 42
  • Number of attempts: 6
Words in parens - 12980 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #1177 / 3972
  • Number of attempts: 1
It's a factor - 104 entries

Flaunt your macro prowess by factoring some numbers. Too hard? It takes less than 30 strokes, I promise.

  • Best score: 24
  • Best player score: 25
  • Position: #6 / 38
  • Number of attempts: 2
Alphabet soup - 434 entries

Create a column of all alphabet characters organized in a funky way

  • Best score: 25
  • Best player score: 25
  • Position: #10 / 109
  • Number of attempts: 7
Simple text editing with Vim - 13184 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #687 / 3789
  • Number of attempts: 3

Contributed Challenges

CSV to MD format - 429 entries

To convert a CSV list to Markdown list

Increment number for every 10 lines - 231 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

Selvaganapathy P
Twitter:

entered into 47 challenges

contributed 2 challenges