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 - 2537 entries

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

  • Best score: 14
  • Best player score: 16
  • Position: #140 / 553
  • Number of attempts: 4
Filter number combinations that don't add to 11 - 408 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 / 117
  • Number of attempts: 4
Tabbed Table to Python Array - 734 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: #69 / 179
  • Number of attempts: 3
Reformat symbols in list - 1621 entries

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

  • Best score: 24
  • Best player score: 27
  • Position: #154 / 348
  • Number of attempts: 7
Many duplicates - 1445 entries

Quick and easy

  • Best score: 7
  • Best player score: 8
  • Position: #215 / 468
  • Number of attempts: 4
2 quick changes and a numbered list - 647 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: #78 / 154
  • Number of attempts: 2
delete swap - 1786 entries

delete all swap

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

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

  • Best score: 10
  • Best player score: 14
  • Position: #436 / 556
  • Number of attempts: 1
Wikitext headings to markdown - 987 entries

Convert the wikitext headings to markdown.

  • Best score: 20
  • Best player score: 28
  • Position: #125 / 209
  • Number of attempts: 1
hello-world-vimgolf - 2499 entries

Simple number generation

  • Best score: 10
  • Best player score: 10
  • Position: #254 / 708
  • Number of attempts: 8
Plotting some variables in python - 1661 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: #303 / 348
  • Number of attempts: 1
Lowercase first characters - 487 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: #61 / 183
  • Number of attempts: 2
simple replacements - 1753 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 26
  • Position: #271 / 380
  • Number of attempts: 1
Inverting Lines - 1900 entries

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

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

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

  • Best score: 38
  • Best player score: 66
  • Position: #74 / 98
  • Number of attempts: 2
Python dataclasses - 1136 entries

Simple challenge to extract fields from a Python class

  • Best score: 19
  • Best player score: 24
  • Position: #139 / 284
  • Number of attempts: 2
Modernise code - 1400 entries

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 43
  • Position: #154 / 323
  • Number of attempts: 2
swap number pairs - 2103 entries

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

  • Best score: 16
  • Best player score: 34
  • Position: #283 / 380
  • Number of attempts: 2
Extend shell script - 134 entries

Just add some more stuff

  • Best score: 37
  • Best player score: 78
  • Position: #39 / 45
  • Number of attempts: 1
Python: Def to Lambda - 455 entries

LAMBDA!!!

  • Best score: 19
  • Best player score: 24
  • Position: #136 / 156
  • Number of attempts: 1
Multiline to Single Line - 700 entries

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

  • Best score: 5
  • Best player score: 5
  • Position: #146 / 302
  • Number of attempts: 2
From a Thunderlink to a Markdown link - 764 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 / 169
  • Number of attempts: 2
François
Twitter:

entered into 22 challenges

contributed 0 challenges