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 - 2007 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: #253 / 404
  • Number of attempts: 1
xrandr outputs and dashes - 588 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: #137 / 192
  • Number of attempts: 3
From a Thunderlink to a Markdown link - 702 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: #77 / 155
  • Number of attempts: 5
Yo To Hello - 1048 entries

Simply Turn Yo To Hello

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

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

  • Best score: 20
  • Best player score: 26
  • Position: #192 / 237
  • Number of attempts: 2
Get mail address from outlook format - 592 entries

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

  • Best score: 15
  • Best player score: 21
  • Position: #141 / 182
  • Number of attempts: 1
prepend * to every non-blank line - 5959 entries

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

  • Best score: 10
  • Best player score: 11
  • Position: #519 / 1463
  • Number of attempts: 4
Unsemantic linewrapping - 826 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 / 208
  • Number of attempts: 3
V to the i - 4639 entries

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

  • Best score: 7
  • Best player score: 9
  • Position: #1701 / 1856
  • Number of attempts: 1
Applying same text modification in several lines - 2748 entries

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

  • Best score: 12
  • Best player score: 13
  • Position: #150 / 815
  • Number of attempts: 3
Add semicolons - 10539 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 16
  • Position: #2294 / 2988
  • Number of attempts: 1
Tables, Functions, Sprocs - 113 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 / 38
  • Number of attempts: 5
Just the middle - 11136 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #2827 / 4112
  • Number of attempts: 3
Basic renumbering - 5430 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 25
  • Position: #1118 / 1227
  • Number of attempts: 2
Add to end of each line... kinda - 289 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 / 156
  • Number of attempts: 3
One to Ten - 2093 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: #366 / 641
  • Number of attempts: 1
Join 'em - 228 entries

This shouldn't be too tough

  • Best score: 4
  • Best player score: 5
  • Position: #57 / 134
  • Number of attempts: 3
change parenthesis - 251 entries

change the pair of braces into a pair of parentheses

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

Oops.

  • Best score: 10
  • Best player score: 15
  • Position: #2264 / 4114
  • Number of attempts: 1
Words in parens - 12736 entries

We should all ace this, right?

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

entered into 20 challenges

contributed 0 challenges