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

Words in parens - 12053 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 14
  • Number of attempts: 2
From a Thunderlink to a Markdown link - 284 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 - 559 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
Get mail address from outlook format - 358 entries

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

  • Best score: 15
  • Best player score: 21
  • Number of attempts: 1
change parenthesis - 219 entries

change the pair of braces into a pair of parentheses

  • Best score: 9
  • Best player score: 9
  • Number of attempts: 2
Join 'em - 192 entries

This shouldn't be too tough

  • Best score: 4
  • Best player score: 5
  • Number of attempts: 3
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
Applying same text modification in several lines - 2443 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
I forgot quotes - 14455 entries

Oops.

  • Best score: 10
  • Best player score: 15
  • Number of attempts: 1
Just the middle - 10428 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Number of attempts: 3
Unsemantic linewrapping - 636 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
xrandr outputs and dashes - 218 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
Yo To Hello - 379 entries

Simply Turn Yo To Hello

  • Best score: 10
  • Best player score: 10
  • Number of attempts: 4
V to the i - 4374 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 - 1728 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
Add semicolons - 8123 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 16
  • Number of attempts: 1
prepend * to every non-blank line - 3254 entries

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

  • Best score: 10
  • Best player score: 11
  • Number of attempts: 4
Basic renumbering - 5136 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 25
  • Number of attempts: 2
Add to end of each line... kinda - 278 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
Fabien C.
Twitter:

entered into 19 challenges

contributed 0 challenges