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

Fix timezone format - 61 entries

Add the missing T and Z in the datetime field. There should be a T instead of the space, and a Z at the end of the datetime. `2024-08-31 18:32:00;` -> `2024-08-31T18:32:00Z;`

  • Best score: 15
  • Best player score: 17
  • Position: #15 / 21
  • Number of attempts: 4
Remove adjacent duplicates - 278 entries

Try to find a way to remove adjacent duplicate letters.

  • Best score: 19
  • Best player score: 21
  • Position: #20 / 76
  • Number of attempts: 5
Quicksort - 1838 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: #131 / 403
  • Number of attempts: 6
EDN reformat - 1102 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 / 154
  • Number of attempts: 1
Populate 3D bone names list - 580 entries

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

  • Best score: 21
  • Best player score: 21
  • Position: #4 / 147
  • Number of attempts: 5
Remove line numbers - 671 entries

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

  • Best score: 10
  • Best player score: 21
  • Position: #121 / 182
  • Number of attempts: 1
Find fix point of cos - 1303 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 / 381
  • Number of attempts: 5
Surround the 'z' character with brackets, quotes, and print as formatted string. - 532 entries

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

  • Best score: 17
  • Best player score: 17
  • Position: #125 / 294
  • Number of attempts: 1
Paste a column after a column - 2477 entries

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

  • Best score: 14
  • Best player score: 16
  • Position: #169 / 535
  • Number of attempts: 7
Filter number combinations that don't add to 11 - 398 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 / 113
  • Number of attempts: 4
Tabbed Table to Python Array - 706 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: #114 / 174
  • Number of attempts: 1
Poorly indented Python comments - 1300 entries

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

  • Best score: 15
  • Best player score: 42
  • Position: #152 / 218
  • Number of attempts: 1
delete swap - 1754 entries

delete all swap

  • Best score: 5
  • Best player score: 5
  • Position: #271 / 542
  • Number of attempts: 1
Generate a very basic Python constructor (fixed) - 1250 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: #188 / 270
  • Number of attempts: 3
Fix the shell script! - 2540 entries

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 32
  • Position: #278 / 587
  • Number of attempts: 6
Put a newline after every 10 lines in vim - 1656 entries

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

  • Best score: 10
  • Best player score: 11
  • Position: #183 / 555
  • Number of attempts: 3
Wikitext headings to markdown - 986 entries

Convert the wikitext headings to markdown.

  • Best score: 20
  • Best player score: 21
  • Position: #67 / 208
  • Number of attempts: 4
Lowercase first characters - 486 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 / 182
  • Number of attempts: 1
Inverting Lines - 1879 entries

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

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

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

  • Best score: 16
  • Best player score: 22
  • Position: #76 / 100
  • Number of attempts: 3
Append semicolon after expressions - 1041 entries

Some lines need the semicolon, some don't.

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

honk honk

entered into 21 challenges

contributed 0 challenges