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

Satisfy the go linter - 1519 entries

You just came up with this briliant go vars package. But dang, you forgot to add comments to the exported variables. Can you add a comment over each variable with a TODO-placeholder?

  • Best score: 20
  • Best player score: 27
  • Position: #193 / 314
  • Number of attempts: 1
xrandr outputs and dashes - 523 entries

uh oh, different video drivers identify display outputs with more dashes. Quick, need to change this xrandr script!

  • Best score: 12
  • Best player score: 13
  • Position: #122 / 173
  • Number of attempts: 3
From a Thunderlink to a Markdown link - 587 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: 21
  • Position: #65 / 136
  • Number of attempts: 5
Yo To Hello - 883 entries

Simply Turn Yo To Hello

  • Best score: 10
  • Best player score: 10
  • Position: #50 / 414
  • Number of attempts: 4
Hogwarts Email Sorting - 783 entries

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

  • Best score: 20
  • Best player score: 26
  • Position: #182 / 224
  • Number of attempts: 2
Get mail address from outlook format - 525 entries

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

  • Best score: 15
  • Best player score: 21
  • Position: #123 / 165
  • Number of attempts: 1
prepend * to every non-blank line - 5776 entries

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

  • Best score: 10
  • Best player score: 11
  • Position: #502 / 1421
  • Number of attempts: 4
Unsemantic linewrapping - 806 entries

[Inspired by a blog post I read: https://scott.mn/2014/02/21/semantic_linewrapping/. Text adapted.] Sometimes when editing a Markdown file, I wrap the lines semantically. Instead of inserting a newline at 70 columns (or whatever), or making paragraphs one long line, I put in newlines at a point that seems logical to me. This may seem silly, but it produces better diffs. Semantic linewrapping also makes editing snappier. I can delete, edit or insert sentences easily using linewise operations. Code-oriented text editors like Vim and [REDACTED] are really good at this kind of manipulation. Editing text that hasn't been wrapped semantically is a pain, though:

  • Best score: 9
  • Best player score: 9
  • Position: #21 / 201
  • Number of attempts: 3
V to the i - 4596 entries

Input is 99 V's. Output is 100 i's.

  • Best score: 7
  • Best player score: 9
  • Position: #1685 / 1837
  • Number of attempts: 1
Applying same text modification in several lines - 2699 entries

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

  • Best score: 12
  • Best player score: 13
  • Position: #143 / 803
  • Number of attempts: 3
Add semicolons - 10429 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 16
  • Position: #2266 / 2954
  • Number of attempts: 1
Tables, Functions, Sprocs - 106 entries

In order to load some scripts into my database in the correct order I need to load tables first (t_), then functions (fn_), then stored procedures (sp_). The order of the t_ lines and the order of the sp_ lines should also match. Reorder the lines so they will load correctly.

  • Best score: 10
  • Best player score: 10
  • Position: #14 / 36
  • Number of attempts: 5
Just the middle - 11074 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #2819 / 4088
  • Number of attempts: 3
Basic renumbering - 5393 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 25
  • Position: #1109 / 1218
  • Number of attempts: 2
Add to end of each line... kinda - 285 entries

Visual-block mode can be used to add something to the end of each line, even if they are of differing lengths. However, what if it's not quite at the end?

  • Best score: 12
  • Best player score: 12
  • Position: #96 / 153
  • Number of attempts: 3
One to Ten - 2055 entries

Generate the sequence of numbers from 1 to 10, one number per line. Inspired by this Reddit thread: https://redd.it/ak4it2

  • Best score: 12
  • Best player score: 13
  • Position: #356 / 629
  • Number of attempts: 1
Join 'em - 211 entries

This shouldn't be too tough

  • Best score: 4
  • Best player score: 5
  • Position: #52 / 123
  • Number of attempts: 3
change parenthesis - 235 entries

change the pair of braces into a pair of parentheses

  • Best score: 9
  • Best player score: 9
  • Position: #43 / 133
  • Number of attempts: 2
I forgot quotes - 15636 entries

Oops.

  • Best score: 10
  • Best player score: 15
  • Position: #2250 / 4094
  • Number of attempts: 1
Words in parens - 12677 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #980 / 3903
  • Number of attempts: 2
Fabien C.
Twitter:

entered into 20 challenges

contributed 0 challenges