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 - 1631 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: #119 / 363
  • 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 - 362 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: #60 / 78
  • Number of attempts: 2
Remove line numbers - 598 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: #66 / 159
  • Number of attempts: 6
Find fix point of cos - 1160 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 / 351
  • Number of attempts: 5
Insert column data on Confluence-style table - 437 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: #62 / 102
  • Number of attempts: 11
Surround the 'z' character with brackets, quotes, and print as formatted string. - 494 entries

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

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

Align the columns of a markdown table

  • Best score: 51
  • Best player score: 220
  • Position: #58 / 92
  • Number of attempts: 3
Paste a column after a column - 2324 entries

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

  • Best score: 14
  • Best player score: 17
  • Position: #197 / 502
  • Number of attempts: 7
Filter number combinations that don't add to 11 - 378 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 / 112
  • Number of attempts: 5
Tabbed Table to Python Array - 645 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 - 1517 entries

Convert the data to a python dictionary

  • Best score: 12
  • Best player score: 72
  • Position: #212 / 400
  • Number of attempts: 3
Reformat symbols in list - 1477 entries

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

  • Best score: 24
  • Best player score: 33
  • Position: #200 / 327
  • 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 - 1284 entries

Quick and easy

  • Best score: 7
  • Best player score: 9
  • Position: #299 / 421
  • Number of attempts: 5
delete swap - 1574 entries

delete all swap

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

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

  • Best score: 10
  • Best player score: 13
  • Position: #383 / 534
  • Number of attempts: 1
Inverting Lines - 1850 entries

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

  • Best score: 10
  • Best player score: 18
  • Position: #430 / 501
  • 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 - 7813 entries

Little role switching.

  • Best score: 12
  • Best player score: 12
  • Position: #612 / 2106
  • 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 - 1015 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 12
  • Position: #259 / 407
  • 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 - 635 entries

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

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

Numbers are fun!

  • Best score: 5
  • Best player score: 6
  • Position: #344 / 357
  • 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 - 6633 entries

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

  • Best score: 32
  • Best player score: 65
  • Position: #1535 / 1631
  • Number of attempts: 1

Contributed Challenges

Pick and sort servers from mirror list - 362 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 - 1069 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