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

Tic-Tac-Toe Grid Transformation - 7 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: 58
  • Best player score: 125
  • Position: #5 / 7
  • Number of attempts: 1
Pick and sort servers from mirror list - 32 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: #12 / 12
  • Number of attempts: 2
Remove line numbers - 71 entries

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

  • Best score: 12
  • Best player score: 13
  • Position: #14 / 27
  • Number of attempts: 6
Find fix point of cos - 641 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 / 179
  • Number of attempts: 5
Insert column data on Confluence-style table - 264 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: #40 / 67
  • Number of attempts: 11
Surround the 'z' character with brackets, quotes, and print as formatted string. - 335 entries

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

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

Align the columns of a markdown table

  • Best score: 57
  • Best player score: 220
  • Position: #39 / 67
  • Number of attempts: 3
Paste a column after a column - 1663 entries

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

  • Best score: 14
  • Best player score: 17
  • Position: #143 / 364
  • Number of attempts: 7
Filter number combinations that don't add to 11 - 243 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: #48 / 79
  • Number of attempts: 5
Tabbed Table to Python Array - 483 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: #87 / 135
  • Number of attempts: 1
HS exam question - 1272 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 72
  • Position: #180 / 346
  • Number of attempts: 3
Reformat symbols in list - 1198 entries

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

  • Best score: 24
  • Best player score: 33
  • Position: #164 / 272
  • Number of attempts: 1
Fizzbuzz - 422 entries

type the first 100 lines of the fizzbuzz problem

  • Best score: 47
  • Best player score: 71
  • Position: #52 / 133
  • Number of attempts: 5
Substraction (bis) - 448 entries

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

  • Best score: 22
  • Best player score: 86
  • Position: #78 / 90
  • Number of attempts: 2
Many duplicates - 1044 entries

Quick and easy

  • Best score: 7
  • Best player score: 9
  • Position: #248 / 340
  • Number of attempts: 5
delete swap - 1265 entries

delete all swap

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

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

  • Best score: 10
  • Best player score: 13
  • Position: #349 / 479
  • Number of attempts: 1
Inverting Lines - 1630 entries

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

  • Best score: 10
  • Best player score: 18
  • Position: #377 / 441
  • Number of attempts: 2
Modernise code - 1208 entries

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 37
  • Position: #103 / 283
  • Number of attempts: 5
Vice versa - 7675 entries

Little role switching.

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

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 12
  • Position: #322 / 637
  • Number of attempts: 8
Append semicolon after expressions - 986 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 12
  • Position: #255 / 397
  • Number of attempts: 2
Remove noise from HTTP log - 675 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 / 266
  • Number of attempts: 5
Remove semicolons after expressions - 602 entries

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

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

Numbers are fun!

  • Best score: 5
  • Best player score: 6
  • Position: #337 / 350
  • Number of attempts: 1
Calculate the table totals - 129 entries

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

  • Best score: 33
  • Best player score: 57
  • Position: #28 / 42
  • Number of attempts: 6
It'ss tooo coold too typpe todaay - 211 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 - 6332 entries

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

  • Best score: 32
  • Best player score: 65
  • Position: #1472 / 1560
  • Number of attempts: 1

Contributed Challenges

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

Milan Blažek
Twitter2:

entered into 29 challenges

contributed 2 challenges