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

Quicksort - 1945 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.

  • Best score: 6
  • Best player score: 7
  • Position: #134 / 429
  • Number of attempts: 5
Tic-Tac-Toe Grid Transformation - 396 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.

  • Best score: 56
  • Best player score: 125
  • Position: #47 / 83
  • Number of attempts: 1
Pick and sort servers from mirror list - 431 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.

  • Best score: 28
  • Best player score: 50
  • Position: #68 / 87
  • Number of attempts: 2
Remove line numbers - 731 entries

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

  • Best score: 9
  • Best player score: 13
  • Position: #84 / 194
  • Number of attempts: 6
Find fix point of cos - 1397 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.

  • Best score: 14
  • Best player score: 14
  • Position: #25 / 411
  • Number of attempts: 5
Insert column data on Confluence-style table - 458 entries

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

  • Best score: 33
  • Best player score: 50
  • Position: #65 / 109
  • Number of attempts: 11
Surround the 'z' character with brackets, quotes, and print as formatted string. - 554 entries

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

  • Best score: 17
  • Best player score: 17
  • Position: #102 / 309
  • Number of attempts: 2
Easier Align - 406 entries

Align the columns of a markdown table

  • Best score: 51
  • Best player score: 220
  • Position: #60 / 96
  • Number of attempts: 3
Paste a column after a column - 2534 entries

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

  • Best score: 14
  • Best player score: 17
  • Position: #212 / 552
  • Number of attempts: 7
Filter number combinations that don't add to 11 - 408 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: #72 / 117
  • Number of attempts: 5
Tabbed Table to Python Array - 734 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

  • Best score: 50
  • Best player score: 65
  • Position: #117 / 179
  • Number of attempts: 1
HS exam question - 1580 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 72
  • Position: #220 / 417
  • Number of attempts: 3
Reformat symbols in list - 1614 entries

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

  • Best score: 24
  • Best player score: 33
  • Position: #212 / 347
  • Number of attempts: 1
Fizzbuzz - 557 entries

type the first 100 lines of the fizzbuzz problem

  • Best score: 45
  • Best player score: 71
  • Position: #66 / 166
  • Number of attempts: 5
Substraction (bis) - 588 entries

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

  • Best score: 21
  • Best player score: 86
  • Position: #96 / 112
  • Number of attempts: 2
Many duplicates - 1445 entries

Quick and easy

  • Best score: 7
  • Best player score: 9
  • Position: #330 / 468
  • Number of attempts: 5
delete swap - 1783 entries

delete all swap

  • Best score: 5
  • Best player score: 5
  • Position: #268 / 555
  • Number of attempts: 1
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.

  • Best score: 29
  • Best player score: 43
  • Position: #131 / 271
  • Number of attempts: 4
Put a newline after every 10 lines in vim - 1657 entries

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

  • Best score: 10
  • Best player score: 13
  • Position: #390 / 556
  • Number of attempts: 1
Inverting Lines - 1900 entries

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

  • Best score: 10
  • Best player score: 18
  • Position: #438 / 511
  • Number of attempts: 2
Modernise code - 1400 entries

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 37
  • Position: #117 / 323
  • Number of attempts: 5
Vice versa - 7904 entries

Little role switching.

  • Best score: 12
  • Best player score: 12
  • Position: #612 / 2126
  • Number of attempts: 7
Switch function arguments - 2139 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 12
  • Position: #332 / 663
  • Number of attempts: 8
Append semicolon after expressions - 1056 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 12
  • Position: #263 / 419
  • Number of attempts: 2
Remove noise from HTTP log - 717 entries

This piece of log (from the year 2000) contains some irrelevant data. We only want to see the HTTP method and resource.

  • Best score: 15
  • Best player score: 15
  • Position: #143 / 273
  • Number of attempts: 5
Remove semicolons after expressions - 654 entries

A follow-up for http://vimgolf.com/challenges/4fc9d767d3a0d4000100000e.

  • Best score: 6
  • Best player score: 6
  • Position: #131 / 263
  • Number of attempts: 4
The meaning - 575 entries

Numbers are fun!

  • Best score: 5
  • Best player score: 6
  • Position: #349 / 363
  • Number of attempts: 1
Calculate the table totals - 146 entries

Go ahead... commit the treachery of using vim as a spreadsheet.

  • Best score: 33
  • Best player score: 57
  • Position: #29 / 45
  • Number of attempts: 6
It'ss tooo coold too typpe todaay - 224 entries

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

  • Best score: 16
  • Best player score: 23
  • Position: #70 / 98
  • Number of attempts: 2
Reformat/Refactor a Golfer Class - 6972 entries

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

  • Best score: 28
  • Best player score: 65
  • Position: #1597 / 1703
  • Number of attempts: 1

Contributed Challenges

Pick and sort servers from mirror list - 431 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.

Tic-Tac-Toe Grid Transformation - 396 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.

EDN reformat - 1158 entries

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

Milan Blažek
Twitter2:

entered into 30 challenges

contributed 3 challenges