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

Paste a column after a column - 2262 entries

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

  • Best score: 14
  • Best player score: 16
  • Position: #128 / 491
  • Number of attempts: 4
Filter number combinations that don't add to 11 - 376 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: #9 / 110
  • Number of attempts: 4
Tabbed Table to Python Array - 644 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: 57
  • Position: #61 / 167
  • Number of attempts: 3
Reformat symbols in list - 1470 entries

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

  • Best score: 24
  • Best player score: 27
  • Position: #144 / 323
  • Number of attempts: 7
Many duplicates - 1253 entries

Quick and easy

  • Best score: 7
  • Best player score: 8
  • Position: #207 / 412
  • Number of attempts: 4
2 quick changes and a numbered list - 599 entries

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

  • Best score: 37
  • Best player score: 45
  • Position: #75 / 145
  • Number of attempts: 2
delete swap - 1525 entries

delete all swap

  • Best score: 5
  • Best player score: 5
  • Position: #217 / 478
  • Number of attempts: 1
Put a newline after every 10 lines in vim - 1578 entries

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

  • Best score: 10
  • Best player score: 14
  • Position: #410 / 525
  • Number of attempts: 1
Wikitext headings to markdown - 980 entries

Convert the wikitext headings to markdown.

  • Best score: 20
  • Best player score: 28
  • Position: #122 / 203
  • Number of attempts: 1
hello-world-vimgolf - 2361 entries

Simple number generation

  • Best score: 10
  • Best player score: 10
  • Position: #254 / 667
  • Number of attempts: 8
Plotting some variables in python - 1567 entries

4 sets of (x,y) variables to plot. Just increment the numbers! Well, let's change the colors of the lines as well. Oh and we meant to plot the absolute values of course.

  • Best score: 34
  • Best player score: 66
  • Position: #292 / 334
  • Number of attempts: 1
Lowercase first characters - 467 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: 35
  • Position: #58 / 175
  • Number of attempts: 2
simple replacements - 1662 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 26
  • Position: #261 / 371
  • Number of attempts: 1
Inverting Lines - 1832 entries

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

  • Best score: 10
  • Best player score: 10
  • Position: #102 / 497
  • Number of attempts: 2
Generate a very basic Python constructor - 307 entries

I actually needed to do this myself, so I look forward to learning how.

  • Best score: 38
  • Best player score: 66
  • Position: #71 / 94
  • Number of attempts: 2
Python dataclasses - 1104 entries

Simple challenge to extract fields from a Python class

  • Best score: 19
  • Best player score: 24
  • Position: #136 / 277
  • Number of attempts: 2
Modernise code - 1333 entries

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 43
  • Position: #146 / 307
  • Number of attempts: 2
swap number pairs - 2011 entries

Swap the numbers in a bunch of 2-element arrays.

  • Best score: 16
  • Best player score: 34
  • Position: #277 / 370
  • Number of attempts: 2
Extend shell script - 103 entries

Just add some more stuff

  • Best score: 37
  • Best player score: 78
  • Position: #36 / 42
  • Number of attempts: 1
Python: Def to Lambda - 423 entries

LAMBDA!!!

  • Best score: 19
  • Best player score: 24
  • Position: #131 / 149
  • Number of attempts: 1
Multiline to Single Line - 668 entries

Convert a multiline, indented file to a single line with no whitespace

  • Best score: 5
  • Best player score: 5
  • Position: #146 / 292
  • Number of attempts: 2
From a Thunderlink to a Markdown link - 747 entries

ThunderLinks are durable hyperlinks to specific email messages generated from Thunderbird in HTML format. Leverage the power of vim to make them suitable for a markdown-formatted file.

  • Best score: 18
  • Best player score: 18
  • Position: #47 / 166
  • Number of attempts: 2
François
Twitter:

entered into 22 challenges

contributed 0 challenges