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 - 1757 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: 6
  • Position: #24 / 385
  • Number of attempts: 6
EDN reformat - 1099 entries

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

  • Best score: 17
  • Best player score: 18
  • Position: #28 / 153
  • Number of attempts: 5
Tic-Tac-Toe Grid Transformation - 329 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: 105
  • Position: #31 / 80
  • Number of attempts: 1
Pick and sort servers from mirror list - 379 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: 33
  • Position: #37 / 81
  • Number of attempts: 3
Populate 3D bone names list - 525 entries

Ran into this at work, excited to see how this gets optimized

  • Best score: 21
  • Best player score: 21
  • Position: #5 / 141
  • Number of attempts: 4
Remove line numbers - 654 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: #75 / 173
  • Number of attempts: 3
Find fix point of cos - 1204 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: 15
  • Position: #146 / 365
  • Number of attempts: 2
Insert column data on Confluence-style table - 442 entries

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

  • Best score: 33
  • Best player score: 49
  • Position: #60 / 105
  • Number of attempts: 2
Surround the 'z' character with brackets, quotes, and print as formatted string. - 507 entries

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

  • Best score: 17
  • Best player score: 17
  • Position: #127 / 287
  • Number of attempts: 1
Easier Align - 358 entries

Align the columns of a markdown table

  • Best score: 51
  • Best player score: 206
  • Position: #54 / 92
  • Number of attempts: 1
Paste a column after a column - 2413 entries

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

  • Best score: 14
  • Best player score: 14
  • Position: #66 / 523
  • Number of attempts: 5
Filter number combinations that don't add to 11 - 379 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: 27
  • Position: #22 / 112
  • Number of attempts: 3
Tabbed Table to Python Array - 652 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: 54
  • Position: #43 / 171
  • Number of attempts: 3
HS exam question - 1523 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 58
  • Position: #104 / 404
  • Number of attempts: 3
Reformat symbols in list - 1507 entries

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

  • Best score: 24
  • Best player score: 24
  • Position: #47 / 334
  • Number of attempts: 11
Fizzbuzz - 539 entries

type the first 100 lines of the fizzbuzz problem

  • Best score: 45
  • Best player score: 66
  • Position: #48 / 162
  • Number of attempts: 1
Substraction (bis) - 582 entries

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

  • Best score: 21
  • Best player score: 28
  • Position: #51 / 110
  • Number of attempts: 3
Changing around text with citations - 324 entries

Based off of something I saw on reddit

  • Best score: 28
  • Best player score: 47
  • Position: #73 / 90
  • Number of attempts: 2
Poorly indented Python comments - 1275 entries

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

  • Best score: 15
  • Best player score: 15
  • Position: #38 / 213
  • Number of attempts: 14
2 quick changes and a numbered list - 615 entries

The ascii will not be lost, but rather numbered in 4 digit blocks with leading zeros.

  • Best score: 37
  • Best player score: 44
  • Position: #73 / 148
  • Number of attempts: 3
delete swap - 1650 entries

delete all swap

  • Best score: 5
  • Best player score: 5
  • Position: #274 / 514
  • Number of attempts: 1
Generate a very basic Python constructor (fixed) - 1231 entries

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

  • Best score: 29
  • Best player score: 29
  • Position: #50 / 260
  • Number of attempts: 7
Fix the shell script! - 2431 entries

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 27
  • Position: #112 / 569
  • Number of attempts: 6
Put a newline after every 10 lines in vim - 1649 entries

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

  • Best score: 10
  • Best player score: 13
  • Position: #393 / 551
  • Number of attempts: 2
Java to JavaScript - 267 entries

Let convert some simple Java file to JavaScript!

  • Best score: 59
  • Best player score: 59
  • Position: #10 / 72
  • Number of attempts: 6
Wikitext headings to markdown - 985 entries

Convert the wikitext headings to markdown.

  • Best score: 20
  • Best player score: 20
  • Position: #41 / 207
  • Number of attempts: 5
hello-world-vimgolf - 2472 entries

Simple number generation

  • Best score: 10
  • Best player score: 10
  • Position: #286 / 699
  • Number of attempts: 3
Contribute to keyboard mashing - 880 entries

Speak in tongues

  • Best score: 17
  • Best player score: 18
  • Position: #106 / 268
  • Number of attempts: 4
Reordering Lorem Ipsum - 265 entries

Who even sorted this?

  • Best score: 13
  • Best player score: 13
  • Position: #19 / 64
  • Number of attempts: 2
Fill in the chess board - 933 entries

Fill in the name of each square using its file (a-h) and rank (1-8).

  • Best score: 19
  • Best player score: 19
  • Position: #29 / 180
  • Number of attempts: 8
Lowercase first characters - 484 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: 39
  • Position: #92 / 181
  • Number of attempts: 1
simple replacements - 1710 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 19
  • Position: #74 / 378
  • Number of attempts: 3
Inverting Lines - 1870 entries

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

  • Best score: 10
  • Best player score: 12
  • Position: #300 / 505
  • Number of attempts: 3
CSV to MD format - 404 entries

To convert a CSV list to Markdown list

  • Best score: 36
  • Best player score: 36
  • Position: #12 / 93
  • Number of attempts: 10
Word frequency alignment - 278 entries

You've got to align the second column, but the spacing is inconvenient and there are nasty tabs in the way. If you're a "real Vim ninja," this could be very quick indeed...

  • Best score: 5
  • Best player score: 5
  • Position: #121 / 159
  • Number of attempts: 3
Whitespace, empty lines and tabs - 3508 entries

Convert tabs to spaces, strip empty lines and trailing whitespace.

  • Best score: 16
  • Best player score: 17
  • Position: #157 / 758
  • Number of attempts: 5
Simple text editing with Vim - 12491 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #692 / 3626
  • Number of attempts: 3
Monkey Boy
Twitter2:

entered into 37 challenges

contributed 0 challenges