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

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

  • Best score: 14
  • Best player score: 16
  • Position: #65 / 236
  • Number of attempts: 4
Filter number combinations that don't add to 11 - 164 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 / 54
  • Number of attempts: 4
Tabbed Table to Python Array - 389 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: 51
  • Best player score: 57
  • Position: #36 / 110
  • Number of attempts: 3
Reformat symbols in list - 1035 entries

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

  • Best score: 24
  • Best player score: 27
  • Position: #108 / 235
  • Number of attempts: 7
Many duplicates - 851 entries

Quick and easy

  • Best score: 7
  • Best player score: 8
  • Position: #192 / 287
  • Number of attempts: 4
2 quick changes and a numbered list - 459 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: #60 / 109
  • Number of attempts: 2
delete swap - 1095 entries

delete all swap

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

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

  • Best score: 10
  • Best player score: 14
  • Position: #354 / 458
  • Number of attempts: 1
Wikitext headings to markdown - 781 entries

Convert the wikitext headings to markdown.

  • Best score: 20
  • Best player score: 28
  • Position: #101 / 172
  • Number of attempts: 1
hello-world-vimgolf - 1986 entries

Simple number generation

  • Best score: 10
  • Best player score: 10
  • Position: #254 / 565
  • Number of attempts: 8
Plotting some variables in python - 1404 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: #256 / 296
  • Number of attempts: 1
Lowercase first characters - 421 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: #51 / 152
  • Number of attempts: 2
simple replacements - 1264 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 26
  • Position: #214 / 283
  • Number of attempts: 1
Inverting Lines - 1562 entries

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

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

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

  • Best score: 38
  • Best player score: 66
  • Position: #64 / 85
  • Number of attempts: 2
Python dataclasses - 796 entries

Simple challenge to extract fields from a Python class

  • Best score: 19
  • Best player score: 24
  • Position: #97 / 204
  • Number of attempts: 2
Modernise code - 1103 entries

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 43
  • Position: #126 / 261
  • Number of attempts: 2
swap number pairs - 1871 entries

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

  • Best score: 16
  • Best player score: 34
  • Position: #255 / 346
  • Number of attempts: 2
Extend shell script - 92 entries

Just add some more stuff

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

LAMBDA!!!

  • Best score: 19
  • Best player score: 24
  • Position: #126 / 142
  • Number of attempts: 1
Multiline to Single Line - 585 entries

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

  • Best score: 5
  • Best player score: 5
  • Position: #146 / 260
  • Number of attempts: 2
From a Thunderlink to a Markdown link - 720 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 / 160
  • Number of attempts: 2
Fran├žois
Twitter:

entered into 22 challenges

contributed 0 challenges