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

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: 60
  • Position: #76 / 167
  • Number of attempts: 1
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: 30
  • Position: #182 / 323
  • Number of attempts: 1
Many duplicates - 1253 entries

Quick and easy

  • Best score: 7
  • Best player score: 10
  • Position: #319 / 412
  • Number of attempts: 2
delete swap - 1525 entries

delete all swap

  • Best score: 5
  • Best player score: 6
  • Position: #354 / 478
  • Number of attempts: 4
Generate a very basic Python constructor (fixed) - 1178 entries

Original by @BiddulphCaleb (http://www.vimgolf.com/challenges/6019f1c4642668000cee11e8) - had some extra spaces in output file.

  • Best score: 29
  • Best player score: 55
  • Position: #195 / 247
  • 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: 13
  • Position: #372 / 525
  • Number of attempts: 3
hello-world-vimgolf - 2361 entries

Simple number generation

  • Best score: 10
  • Best player score: 17
  • Position: #568 / 667
  • Number of attempts: 2
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: 57
  • Position: #237 / 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: 43
  • Position: #113 / 175
  • Number of attempts: 1
simple replacements - 1662 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 27
  • Position: #296 / 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: 13
  • Position: #334 / 497
  • Number of attempts: 1
Making 3 line function a one liner. - 305 entries

Simple challenge for frequent action while programming.

  • Best score: 4
  • Best player score: 4
  • Position: #138 / 194
  • Number of attempts: 1
Easy modification of ssh config - 335 entries

Just add another alias to each worker

  • Best score: 24
  • Best player score: 28
  • Position: #60 / 104
  • Number of attempts: 1
Python: Def to Lambda - 423 entries

LAMBDA!!!

  • Best score: 19
  • Best player score: 22
  • Position: #115 / 149
  • Number of attempts: 2
Rural Post - 4368 entries

Simple challenge to remove all but the post code on each line

  • Best score: 9
  • Best player score: 10
  • Position: #454 / 1072
  • Number of attempts: 2
Add quotes to ansible playbook - 930 entries

You created an ansible playbook, but forgot to add quotes. Can you fix it?

  • Best score: 8
  • Best player score: 11
  • Position: #274 / 296
  • 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: #221 / 292
  • Number of attempts: 2
Yo To Hello - 1115 entries

Simply Turn Yo To Hello

  • Best score: 10
  • Best player score: 11
  • Position: #440 / 518
  • Number of attempts: 2
Hogwarts Email Sorting - 877 entries

Given a list of emails, get the students full name and their associated house.

  • Best score: 20
  • Best player score: 33
  • Position: #230 / 254
  • Number of attempts: 1
Get mail address from outlook format - 621 entries

Create a mail list space separated of mail list formatted by outlook

  • Best score: 15
  • Best player score: 18
  • Position: #139 / 196
  • Number of attempts: 1
prepend * to every non-blank line - 6208 entries

Prepend an asterisk to every non-blank line in the input file.

  • Best score: 10
  • Best player score: 20
  • Position: #1288 / 1517
  • Number of attempts: 1
Applying same text modification in several lines - 2845 entries

Remove identical text at the beginning of several lines and the closing parenthesis.

  • Best score: 12
  • Best player score: 17
  • Position: #647 / 840
  • Number of attempts: 1
Add semicolons - 10792 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 12
  • Position: #1937 / 3044
  • Number of attempts: 1
Com(m)a Trouble - 3675 entries

Someone was real stupid when placing his commas. Can you fix it?

  • Best score: 12
  • Best player score: 30
  • Position: #725 / 827
  • Number of attempts: 1
comment and uncomment code inline - 1069 entries

It's very useful to be able to comment out a block of code in a quick edit. And likewise to uncomment the code. This operation often involves multi-line stanzas and even large blocks. With just line-wise navigation and insert mode this would cost you about 4 keystrokes per line. Master this hole of VimGolf and you'll quickly drop your key count in day to day Vim as well.

  • Best score: 9
  • Best player score: 12
  • Position: #264 / 314
  • Number of attempts: 1
ninja substitution - 1372 entries

How can you reuse a previous substitution ?

  • Best score: 14
  • Best player score: 30
  • Position: #236 / 261
  • Number of attempts: 1
Line under headers - 2004 entries

Put a line under each header, and remove the other markdown formatting.

  • Best score: 24
  • Best player score: 31
  • Position: #306 / 496
  • Number of attempts: 1
Vinay Sridhar
Twitter:

entered into 27 challenges

contributed 0 challenges