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

Around the clock - 152 entries

You'll want to use 2 special commands to complete this. If you haven't yet, read through 'input.txt', especially :help simple-changes

  • Best score: 13
  • Best player score: 13
  • Number of attempts: 2
Data reformat - 114 entries

Reformat this copy-paste data! #csv

  • Best score: 38
  • Best player score: 39
  • Number of attempts: 2
Flip the bit - 88 entries

Change the specific 0 to a 1.

  • Best score: 8
  • Best player score: 10
  • Number of attempts: 1
citizen_hacks_2019_challenge2 - 140 entries

For the Citizen Hacks 2019 Vim competition.

  • Best score: 6
  • Best player score: 6
  • Number of attempts: 1
Get mail address from outlook format - 378 entries

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

  • Best score: 15
  • Best player score: 15
  • Number of attempts: 1
simple format (3) - 43 entries

reverse two column values!

  • Best score: 34
  • Best player score: 47
  • Number of attempts: 1
Hogwarts Email Sorting - 561 entries

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

  • Best score: 20
  • Best player score: 21
  • Number of attempts: 2
Swap values inside brackets - 2165 entries

Easy challenge.

  • Best score: 14
  • Best player score: 15
  • Number of attempts: 1
Simple format (2) - 256 entries

try again!

  • Best score: 23
  • Best player score: 24
  • Number of attempts: 5
Triangular Numbers - 64 entries

Generate the first 50 triangular numbers.

  • Best score: 18
  • Best player score: 31
  • Number of attempts: 3
Triangle of arrows - 72 entries

I made this by accident when working on another challenge. How would you go about making this?

  • Best score: 14
  • Best player score: 16
  • Number of attempts: 1
Unsemantic linewrapping - 659 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: 10
  • Number of attempts: 1
Add text at some column - 112 entries

Complete golang struct statement.

  • Best score: 31
  • Best player score: 31
  • Number of attempts: 1
Song Transcription Oops - 197 entries

When transcribing vocal music to Canjo Tab you can start by finding the lowest note and assigning that to zero and working your way up from there. However, without fail, I tend to miscount the notes and when I am near done I find a lower note. I mark this with a "z". This means I have to increase all the previous ones by 1. just a sting of numbers :)

  • Best score: 15
  • Best player score: 15
  • Number of attempts: 1
ASCII-art Histogram - 239 entries

Create an ASCCI-art histogram for the given numbers. Make sure not to leave trailing whitespaces. Thanks to VimGolf I recently discovered a feature of Vim thAT blew my mind. I'm curious to see what real ninjas make of it ;-)

  • Best score: 33
  • Best player score: 41
  • Number of attempts: 6
Two pairs of cluster of letters creates word - 650 entries

Clean and group.

  • Best score: 17
  • Best player score: 21
  • Number of attempts: 1
Increment each number - 767 entries

Increment each number individually by one

  • Best score: 15
  • Best player score: 18
  • Number of attempts: 4
calculations - 187 entries

Complete these (weird) calculations.

  • Best score: 38
  • Best player score: 39
  • Number of attempts: 1
Extract wireshark capture filter - 151 entries

Extract wireshark capture filter from IP plan

  • Best score: 26
  • Best player score: 29
  • Number of attempts: 3
Box it - 6390 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 23
  • Number of attempts: 3
change parenthesis - 219 entries

change the pair of braces into a pair of parentheses

  • Best score: 9
  • Best player score: 9
  • Number of attempts: 1
Replace pattern with 1, 2, 3, ... on each line - 427 entries

For each line replace a search pattern (in this case $) with numbers starting at 1 and then increasing by 1 for each replaced match. a$b$c$ -> a0b1c2

  • Best score: 21
  • Best player score: 35
  • Number of attempts: 1
Resort and deup a CSV list - 125 entries

I'm always adding items to a sorted list. There has to be a better way dedup and resort the lists. There are multiple lists with varying lengths to discourage manual sorting. Also Australia's animals are weird.

  • Best score: 44
  • Best player score: 44
  • Number of attempts: 3
Letterbox - 83 entries

Make a box!

  • Best score: 35
  • Best player score: 49
  • Number of attempts: 2
One number per line - 16700 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 17
  • Number of attempts: 3
Reorder the groups - 922 entries

Change the order so that the groups of fruit come before the vegetables.

  • Best score: 14
  • Best player score: 14
  • Number of attempts: 1
From a Thunderlink to a Markdown link - 328 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: 20
  • Number of attempts: 1
prepend * to every non-blank line - 3468 entries

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

  • Best score: 10
  • Best player score: 11
  • Number of attempts: 1
ninja substitution - 1030 entries

How can you reuse a previous substitution ?

  • Best score: 14
  • Best player score: 16
  • Number of attempts: 1
comment and uncomment code inline - 945 entries

It's very useful to be able to comment out a block of code in a quick edit. And likewise to uncomment the code. This operation often involves multi-line stanzas and even large blocks. With just line-wise navigation and insert mode this would cost you about 4 keystrokes per line. Master this hole of VimGolf and you'll quickly drop your key count in day to day Vim as well.

  • Best score: 9
  • Best player score: 10
  • Number of attempts: 1
Right Align Part of the line - 36 entries

The challenge is to right align a part of the line - this is useful in some SQL queries where it's more clear which are the fields displayed

  • Best score: 19
  • Best player score: 20
  • Number of attempts: 2
Yo To Hello - 418 entries

Simply Turn Yo To Hello

  • Best score: 10
  • Best player score: 10
  • Number of attempts: 1
One to Ten - 1750 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: 12
  • Number of attempts: 1
xrandr outputs and dashes - 273 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: 12
  • Number of attempts: 1
Reconstruct the actual output from my unit test tool report - 95 entries

When a test fails, my unit test tool reports differences between the actual output and the expected output as follow: - line in the expected output but missing in the actual output are prefixed with a dash - unexpected lines in the actual output are prefixed with a plus sign - comments added by the unit test tool are prefixed with a question mark - common lines are showed `as-is` (well, almost;) From that "diff" format, I would like to reconstruct the actual output.

  • Best score: 16
  • Best player score: 16
  • Number of attempts: 2
Refactor typescript arrow function type - 213 entries

Make arrow function type less verbose and easier to read

  • Best score: 20
  • Best player score: 22
  • Number of attempts: 3
Every other line - 2528 entries

AaAaAaA

  • Best score: 12
  • Best player score: 15
  • Number of attempts: 1
Build a six - 257 entries

Just enjoy building "a" floors...

  • Best score: 22
  • Best player score: 22
  • Number of attempts: 2
Convert Application Output to CSV - 138 entries

Change the application output to comma-separated values

  • Best score: 17
  • Best player score: 19
  • Number of attempts: 1
Roger Stoltz
Twitter:

entered into 39 challenges

contributed 0 challenges