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: 7
  • Position: #128 / 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: 22
  • Position: #88 / 153
  • Number of attempts: 1
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: #4 / 141
  • Number of attempts: 5
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: 21
  • Position: #115 / 173
  • Number of attempts: 1
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: 14
  • Position: #26 / 365
  • Number of attempts: 5
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: #125 / 287
  • 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: 16
  • Position: #167 / 523
  • Number of attempts: 7
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: #21 / 112
  • Number of attempts: 4
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: 65
  • Position: #112 / 171
  • Number of attempts: 1
Poorly indented Python comments - 1275 entries

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

  • Best score: 15
  • Best player score: 42
  • Position: #149 / 213
  • Number of attempts: 1
delete swap - 1650 entries

delete all swap

  • Best score: 5
  • Best player score: 5
  • Position: #271 / 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: 51
  • Position: #184 / 260
  • Number of attempts: 3
Fix the shell script! - 2431 entries

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 32
  • Position: #273 / 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: 11
  • Position: #183 / 551
  • Number of attempts: 3
Wikitext headings to markdown - 985 entries

Convert the wikitext headings to markdown.

  • Best score: 20
  • Best player score: 21
  • Position: #67 / 207
  • Number of attempts: 4
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: 42
  • Position: #106 / 181
  • Number of attempts: 1
Inverting Lines - 1870 entries

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

  • Best score: 10
  • Best player score: 10
  • Position: #199 / 505
  • Number of attempts: 1
RUST Cargo.toml version to last - 332 entries

RUST Cargo.toml version to last. rusty practice on vimgolf

  • Best score: 16
  • Best player score: 22
  • Position: #75 / 99
  • Number of attempts: 3
Append semicolon after expressions - 1023 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 11
  • Position: #139 / 410
  • Number of attempts: 5
ilyas
Twitter2:

honk honk

entered into 19 challenges

contributed 0 challenges