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

xrandr outputs and dashes - 375 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
  • Number of attempts: 3
I forgot quotes - 14974 entries

Oops.

  • Best score: 10
  • Best player score: 15
  • Number of attempts: 1
Words in parens - 12286 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 14
  • Number of attempts: 2
Just the middle - 10705 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Number of attempts: 3
Join 'em - 192 entries

This shouldn't be too tough

  • Best score: 4
  • Best player score: 5
  • Number of attempts: 3
Basic renumbering - 5240 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 25
  • Number of attempts: 2
V to the i - 4462 entries

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

  • Best score: 7
  • Best player score: 9
  • Number of attempts: 1
One to Ten - 1845 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
  • Number of attempts: 1
change parenthesis - 220 entries

change the pair of braces into a pair of parentheses

  • Best score: 9
  • Best player score: 9
  • Number of attempts: 2
Add semicolons - 8994 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 16
  • Number of attempts: 1
Get mail address from outlook format - 421 entries

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

  • Best score: 15
  • Best player score: 21
  • Number of attempts: 1
prepend * to every non-blank line - 4423 entries

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

  • Best score: 10
  • Best player score: 11
  • Number of attempts: 4
Unsemantic linewrapping - 698 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
  • Number of attempts: 3
Applying same text modification in several lines - 2556 entries

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

  • Best score: 13
  • Best player score: 13
  • Number of attempts: 3
Add to end of each line... kinda - 280 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
  • Number of attempts: 3
From a Thunderlink to a Markdown link - 458 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
  • Number of attempts: 5
Hogwarts Email Sorting - 626 entries

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

  • Best score: 20
  • Best player score: 26
  • Number of attempts: 2
Tables, Functions, Sprocs - 91 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
  • Number of attempts: 5
Yo To Hello - 618 entries

Simply Turn Yo To Hello

  • Best score: 10
  • Best player score: 10
  • Number of attempts: 4
Satisfy the go linter - 861 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
  • Number of attempts: 1
Fabien C.
Twitter:

entered into 20 challenges

contributed 0 challenges