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

simple replacements - 237 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 20
  • Number of attempts: 1
Inverting Lines - 518 entries

A simple challenge to invert all lines, except the first.

  • Best score: 10
  • Best player score: 10
  • Number of attempts: 1
Making 3 line function a one liner. - 22 entries

Simple challenge for frequent action while programming.

  • Best score: 4
  • Best player score: 4
  • Number of attempts: 1
Modernise code - 443 entries

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 34
  • Number of attempts: 2
HS Final exam vimgolf - 463 entries

Change the initial file to a single line containing all names comma-separated with numbers inside parentheses.

  • Best score: 21
  • Best player score: 22
  • Number of attempts: 2
Extend shell script - 47 entries

Just add some more stuff

  • Best score: 37
  • Best player score: 46
  • Number of attempts: 1
Easy modification of ssh config - 120 entries

Just add another alias to each worker

  • Best score: 24
  • Best player score: 26
  • Number of attempts: 1
ssh config skills - 138 entries

Parse output from `kuebctl get no -o wide` into an .ssh/config file!

  • Best score: 41
  • Best player score: 55
  • Number of attempts: 1
Python: Def to Lambda - 134 entries

LAMBDA!!!

  • Best score: 19
  • Best player score: 19
  • Number of attempts: 1
Turn the x - 114 entries

Turn the x to a +

  • Best score: 19
  • Best player score: 21
  • Number of attempts: 1
Format the CSS - 38 entries

You just copied some CSS color names from the web and need to add them to your python module. Create the COLORS variable and assign a dict() with the names as keys and hex-colors as values. BEWARE OF THE TABS!!

  • Best score: 41
  • Best player score: 45
  • Number of attempts: 1
Add quotes to ansible playbook - 439 entries

You created an ansible playbook, but forgot to add quotes. Can you fix it?

  • Best score: 8
  • Best player score: 9
  • Number of attempts: 1
Data reformat - 199 entries

Reformat this copy-paste data! #csv

  • Best score: 38
  • Best player score: 39
  • Number of attempts: 2
xrandr outputs and dashes - 498 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
From a Thunderlink to a Markdown link - 571 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
Yo To Hello - 833 entries

Simply Turn Yo To Hello

  • Best score: 10
  • Best player score: 10
  • Number of attempts: 1
Replace pattern with 1, 2, 3, ... on each line - 867 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
Reconstruct the actual output from my unit test tool report - 112 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
Right Align Part of the line - 49 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
Get mail address from outlook format - 496 entries

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

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

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

  • Best score: 10
  • Best player score: 11
  • Number of attempts: 1
Add text at some column - 125 entries

Complete golang struct statement.

  • Best score: 31
  • Best player score: 31
  • Number of attempts: 1
Triangle of arrows - 101 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
Hogwarts Email Sorting - 769 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
Refactor typescript arrow function type - 271 entries

Make arrow function type less verbose and easier to read

  • Best score: 20
  • Best player score: 22
  • Number of attempts: 3
calculations - 244 entries

Complete these (weird) calculations.

  • Best score: 38
  • Best player score: 39
  • Number of attempts: 1
citizen_hacks_2019_challenge2 - 156 entries

For the Citizen Hacks 2019 Vim competition.

  • Best score: 6
  • Best player score: 6
  • Number of attempts: 1
Extract wireshark capture filter - 167 entries

Extract wireshark capture filter from IP plan

  • Best score: 25
  • Best player score: 29
  • Number of attempts: 3
ASCII-art Histogram - 269 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
Unsemantic linewrapping - 798 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
Song Transcription Oops - 218 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
change parenthesis - 235 entries

change the pair of braces into a pair of parentheses

  • Best score: 9
  • Best player score: 9
  • Number of attempts: 1
Around the clock - 167 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
Reorder the groups - 1061 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
ninja substitution - 1200 entries

How can you reuse a previous substitution ?

  • Best score: 13
  • Best player score: 16
  • Number of attempts: 1
Resort and deup a CSV list - 128 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
Triangular Numbers - 75 entries

Generate the first 50 triangular numbers.

  • Best score: 18
  • Best player score: 31
  • Number of attempts: 3
Convert Application Output to CSV - 158 entries

Change the application output to comma-separated values

  • Best score: 17
  • Best player score: 19
  • Number of attempts: 1
Two pairs of cluster of letters creates word - 682 entries

Clean and group.

  • Best score: 17
  • Best player score: 21
  • Number of attempts: 1
Letterbox - 83 entries

Make a box!

  • Best score: 35
  • Best player score: 49
  • Number of attempts: 2
Box it - 7596 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 23
  • Number of attempts: 3
Flip the bit - 92 entries

Change the specific 0 to a 1.

  • Best score: 8
  • Best player score: 10
  • Number of attempts: 1
Increment each number - 922 entries

Increment each number individually by one

  • Best score: 15
  • Best player score: 18
  • Number of attempts: 4
Build a six - 264 entries

Just enjoy building "a" floors...

  • Best score: 22
  • Best player score: 22
  • Number of attempts: 2
One to Ten - 2033 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
simple format (3) - 43 entries

reverse two column values!

  • Best score: 34
  • Best player score: 47
  • Number of attempts: 1
Simple format (2) - 295 entries

try again!

  • Best score: 23
  • Best player score: 24
  • Number of attempts: 5
Swap values inside brackets - 2401 entries

Easy challenge.

  • Best score: 14
  • Best player score: 15
  • Number of attempts: 1
comment and uncomment code inline - 973 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: 3
  • Best player score: 10
  • Number of attempts: 1
Every other line - 2769 entries

AaAaAaA

  • Best score: 7
  • Best player score: 15
  • Number of attempts: 1
One number per line - 18191 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 17
  • Number of attempts: 3
Roger Stoltz
Twitter:

entered into 51 challenges

contributed 0 challenges