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 - 2504 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: #316 / 509
  • Number of attempts: 1
xrandr outputs and dashes - 754 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: #165 / 229
  • Number of attempts: 3
From a Thunderlink to a Markdown link - 797 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: #90 / 176
  • Number of attempts: 5
Yo To Hello - 1156 entries

Simply Turn Yo To Hello

  • Best score: 8
  • Best player score: 10
  • Position: #51 / 537
  • Number of attempts: 4
Hogwarts Email Sorting - 954 entries

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

  • Best score: 20
  • Best player score: 26
  • Position: #218 / 272
  • Number of attempts: 2
Get mail address from outlook format - 665 entries

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

  • Best score: 15
  • Best player score: 21
  • Position: #163 / 209
  • Number of attempts: 1
prepend * to every non-blank line - 6401 entries

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

  • Best score: 7
  • Best player score: 11
  • Position: #556 / 1566
  • Number of attempts: 4
Unsemantic linewrapping - 964 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 / 238
  • Number of attempts: 3
V to the i - 4890 entries

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

  • Best score: 7
  • Best player score: 9
  • Position: #1751 / 1917
  • Number of attempts: 1
Applying same text modification in several lines - 2937 entries

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

  • Best score: 7
  • Best player score: 13
  • Position: #168 / 869
  • Number of attempts: 3
Add semicolons - 10966 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 16
  • Position: #2393 / 3100
  • Number of attempts: 1
Tables, Functions, Sprocs - 152 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 / 53
  • Number of attempts: 5
Just the middle - 11636 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #2872 / 4262
  • Number of attempts: 3
Basic renumbering - 5735 entries

Renumbering Basic.

  • Best score: 7
  • Best player score: 25
  • Position: #1169 / 1282
  • Number of attempts: 2
Add to end of each line... kinda - 352 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 / 182
  • Number of attempts: 3
One to Ten - 2261 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: 5
  • Best player score: 13
  • Position: #400 / 690
  • Number of attempts: 1
Join 'em - 261 entries

This shouldn't be too tough

  • Best score: 4
  • Best player score: 5
  • Position: #79 / 159
  • Number of attempts: 3
change parenthesis - 312 entries

change the pair of braces into a pair of parentheses

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

Oops.

  • Best score: 10
  • Best player score: 15
  • Position: #2328 / 4229
  • Number of attempts: 1
Words in parens - 13063 entries

We should all ace this, right?

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

entered into 20 challenges

contributed 0 challenges