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 - 1612 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: #117 / 355
  • Number of attempts: 5
Tic-Tac-Toe Grid Transformation - 326 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: #44 / 79
  • Number of attempts: 1
Pick and sort servers from mirror list - 349 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: #59 / 76
  • Number of attempts: 2
Remove line numbers - 571 entries

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

  • Best score: 8
  • Best player score: 13
  • Position: #64 / 154
  • Number of attempts: 6
Find fix point of cos - 1151 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 / 345
  • Number of attempts: 5
Insert column data on Confluence-style table - 426 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: #60 / 100
  • Number of attempts: 11
Surround the 'z' character with brackets, quotes, and print as formatted string. - 489 entries

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

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

Align the columns of a markdown table

  • Best score: 51
  • Best player score: 220
  • Position: #57 / 91
  • Number of attempts: 3
Paste a column after a column - 2288 entries

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

  • Best score: 14
  • Best player score: 17
  • Position: #196 / 495
  • Number of attempts: 7
Filter number combinations that don't add to 11 - 377 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: #68 / 111
  • Number of attempts: 5
Tabbed Table to Python Array - 644 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: #109 / 167
  • Number of attempts: 1
HS exam question - 1510 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 72
  • Position: #210 / 397
  • Number of attempts: 3
Reformat symbols in list - 1474 entries

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

  • Best score: 24
  • Best player score: 33
  • Position: #199 / 325
  • Number of attempts: 1
Fizzbuzz - 511 entries

type the first 100 lines of the fizzbuzz problem

  • Best score: 45
  • Best player score: 71
  • Position: #63 / 157
  • Number of attempts: 5
Substraction (bis) - 579 entries

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

  • Best score: 21
  • Best player score: 86
  • Position: #95 / 108
  • Number of attempts: 2
Many duplicates - 1265 entries

Quick and easy

  • Best score: 7
  • Best player score: 9
  • Position: #295 / 416
  • Number of attempts: 5
delete swap - 1551 entries

delete all swap

  • Best score: 5
  • Best player score: 5
  • Position: #268 / 486
  • Number of attempts: 1
Generate a very basic Python constructor (fixed) - 1189 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: #126 / 250
  • Number of attempts: 4
Put a newline after every 10 lines in vim - 1588 entries

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

  • Best score: 10
  • Best player score: 13
  • Position: #381 / 529
  • Number of attempts: 1
Inverting Lines - 1837 entries

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

  • Best score: 10
  • Best player score: 18
  • Position: #427 / 498
  • Number of attempts: 2
Modernise code - 1343 entries

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 37
  • Position: #112 / 310
  • Number of attempts: 5
Vice versa - 7806 entries

Little role switching.

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

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 12
  • Position: #327 / 652
  • Number of attempts: 8
Append semicolon after expressions - 1009 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 12
  • Position: #258 / 404
  • Number of attempts: 2
Remove noise from HTTP log - 699 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 / 271
  • Number of attempts: 5
Remove semicolons after expressions - 632 entries

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

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

Numbers are fun!

  • Best score: 5
  • Best player score: 6
  • Position: #343 / 356
  • Number of attempts: 1
Calculate the table totals - 132 entries

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

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

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

  • Best score: 16
  • Best player score: 23
  • Position: #69 / 96
  • Number of attempts: 2
Reformat/Refactor a Golfer Class - 6603 entries

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

  • Best score: 32
  • Best player score: 65
  • Position: #1526 / 1621
  • Number of attempts: 1

Contributed Challenges

Pick and sort servers from mirror list - 349 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 - 326 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 - 1061 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