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: #122 / 363
  • Number of attempts: 6
EDN reformat - 1069 entries

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

  • Best score: 17
  • Best player score: 22
  • Position: #87 / 150
  • Number of attempts: 1
Populate 3D bone names list - 475 entries

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

  • Best score: 21
  • Best player score: 21
  • Position: #4 / 130
  • Number of attempts: 5
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: 21
  • Position: #103 / 159
  • Number of attempts: 1
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: #26 / 351
  • Number of attempts: 5
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: #125 / 278
  • Number of attempts: 1
Paste a column after a column - 2314 entries

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

  • Best score: 14
  • Best player score: 16
  • Position: #162 / 501
  • 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: 27
  • Position: #21 / 112
  • Number of attempts: 4
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: #110 / 167
  • Number of attempts: 1
Poorly indented Python comments - 1217 entries

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

  • Best score: 15
  • Best player score: 42
  • Position: #144 / 206
  • Number of attempts: 1
delete swap - 1574 entries

delete all swap

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

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 32
  • Position: #269 / 550
  • Number of attempts: 6
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: 11
  • Position: #178 / 534
  • Number of attempts: 3
Wikitext headings to markdown - 983 entries

Convert the wikitext headings to markdown.

  • Best score: 20
  • Best player score: 21
  • Position: #66 / 205
  • Number of attempts: 4
Lowercase first characters - 480 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: #105 / 178
  • Number of attempts: 1
Inverting Lines - 1850 entries

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

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

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

  • Best score: 16
  • Best player score: 22
  • Position: #73 / 96
  • Number of attempts: 3
Append semicolon after expressions - 1015 entries

Some lines need the semicolon, some don't.

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

honk honk

entered into 19 challenges

contributed 0 challenges