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 - 646 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: #77 / 168
  • Number of attempts: 1
Reformat symbols in list - 1482 entries

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

  • Best score: 24
  • Best player score: 30
  • Position: #185 / 328
  • Number of attempts: 1
Many duplicates - 1304 entries

Quick and easy

  • Best score: 6
  • Best player score: 10
  • Position: #331 / 427
  • Number of attempts: 2
delete swap - 1606 entries

delete all swap

  • Best score: 5
  • Best player score: 6
  • Position: #372 / 502
  • Number of attempts: 4
Generate a very basic Python constructor (fixed) - 1214 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: #201 / 254
  • Number of attempts: 1
Put a newline after every 10 lines in vim - 1628 entries

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

  • Best score: 10
  • Best player score: 13
  • Position: #380 / 542
  • Number of attempts: 3
hello-world-vimgolf - 2411 entries

Simple number generation

  • Best score: 10
  • Best player score: 17
  • Position: #583 / 686
  • Number of attempts: 2
Plotting some variables in python - 1597 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: #243 / 342
  • Number of attempts: 1
Lowercase first characters - 482 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: #116 / 180
  • Number of attempts: 1
simple replacements - 1706 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 27
  • Position: #302 / 377
  • Number of attempts: 1
Inverting Lines - 1866 entries

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

  • Best score: 10
  • Best player score: 13
  • Position: #340 / 504
  • Number of attempts: 1
Making 3 line function a one liner. - 311 entries

Simple challenge for frequent action while programming.

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

Just add another alias to each worker

  • Best score: 24
  • Best player score: 28
  • Position: #61 / 106
  • Number of attempts: 1
Python: Def to Lambda - 435 entries

LAMBDA!!!

  • Best score: 19
  • Best player score: 22
  • Position: #118 / 152
  • Number of attempts: 2
Rural Post - 4410 entries

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

  • Best score: 9
  • Best player score: 10
  • Position: #457 / 1083
  • Number of attempts: 2
Add quotes to ansible playbook - 940 entries

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

  • Best score: 8
  • Best player score: 11
  • Position: #278 / 300
  • Number of attempts: 1
Multiline to Single Line - 679 entries

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

  • Best score: 5
  • Best player score: 5
  • Position: #221 / 297
  • Number of attempts: 2
Yo To Hello - 1122 entries

Simply Turn Yo To Hello

  • Best score: 10
  • Best player score: 11
  • Position: #443 / 520
  • Number of attempts: 2
Hogwarts Email Sorting - 890 entries

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

  • Best score: 20
  • Best player score: 33
  • Position: #232 / 256
  • Number of attempts: 1
Get mail address from outlook format - 641 entries

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

  • Best score: 15
  • Best player score: 18
  • Position: #142 / 201
  • Number of attempts: 1
prepend * to every non-blank line - 6248 entries

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

  • Best score: 10
  • Best player score: 20
  • Position: #1296 / 1526
  • Number of attempts: 1
Applying same text modification in several lines - 2851 entries

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

  • Best score: 12
  • Best player score: 17
  • Position: #648 / 843
  • Number of attempts: 1
Add semicolons - 10809 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 12
  • Position: #1940 / 3050
  • Number of attempts: 1
Com(m)a Trouble - 3697 entries

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

  • Best score: 12
  • Best player score: 30
  • Position: #732 / 834
  • Number of attempts: 1
comment and uncomment code inline - 1074 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: #265 / 316
  • Number of attempts: 1
ninja substitution - 1382 entries

How can you reuse a previous substitution ?

  • Best score: 14
  • Best player score: 30
  • Position: #238 / 263
  • Number of attempts: 1
Line under headers - 2022 entries

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

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

entered into 27 challenges

contributed 0 challenges