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 format (3) - 43 entries

reverse two column values!

  • Best score: 34
  • Best player score: 47
  • Number of attempts: 1
Resort and deup a CSV list - 122 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
calculations - 174 entries

Complete these (weird) calculations.

  • Best score: 38
  • Best player score: 39
  • Number of attempts: 1
Triangular Numbers - 63 entries

Generate the first 50 triangular numbers.

  • Best score: 18
  • Best player score: 31
  • Number of attempts: 3
Around the clock - 150 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
Box it - 5477 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 23
  • Number of attempts: 3
Extract wireshark capture filter - 150 entries

Extract wireshark capture filter from IP plan

  • Best score: 26
  • Best player score: 29
  • Number of attempts: 3
Song Transcription Oops - 192 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
Swap values inside brackets - 2043 entries

Easy challenge.

  • Best score: 14
  • Best player score: 15
  • Number of attempts: 1
Unsemantic linewrapping - 565 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
change parenthesis - 213 entries

change the pair of braces into a pair of parentheses

  • Best score: 9
  • Best player score: 9
  • Number of attempts: 1
comment and uncomment code inline - 911 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
Convert Application Output to CSV - 135 entries

Change the application output to comma-separated values

  • Best score: 17
  • Best player score: 19
  • Number of attempts: 1
Refactor typescript arrow function type - 172 entries

Make arrow function type less verbose and easier to read

  • Best score: 20
  • Best player score: 22
  • Number of attempts: 3
citizen_hacks_2019_challenge2 - 139 entries

For the Citizen Hacks 2019 Vim competition.

  • Best score: 6
  • Best player score: 6
  • Number of attempts: 1
Reorder the groups - 865 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
One to Ten - 1632 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
Flip the bit - 86 entries

Change the specific 0 to a 1.

  • Best score: 8
  • Best player score: 10
  • Number of attempts: 1
Every other line - 2372 entries

AaAaAaA

  • Best score: 12
  • Best player score: 15
  • Number of attempts: 1
ASCII-art Histogram - 228 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
ninja substitution - 941 entries

How can you reuse a previous substitution ?

  • Best score: 14
  • Best player score: 16
  • Number of attempts: 1
One number per line - 15531 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 17
  • Number of attempts: 3
Increment each number - 664 entries

Increment each number individually by one

  • Best score: 15
  • Best player score: 18
  • Number of attempts: 4
Add text at some column - 92 entries

Complete golang struct statement.

  • Best score: 31
  • Best player score: 31
  • Number of attempts: 1
Two pairs of cluster of letters creates word - 584 entries

Clean and group.

  • Best score: 17
  • Best player score: 21
  • Number of attempts: 1
Build a six - 251 entries

Just enjoy building "a" floors...

  • Best score: 22
  • Best player score: 22
  • Number of attempts: 2
Letterbox - 83 entries

Make a box!

  • Best score: 35
  • Best player score: 49
  • Number of attempts: 2
prepend * to every non-blank line - 1041 entries

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

  • Best score: 10
  • Best player score: 11
  • Number of attempts: 1
Simple format (2) - 255 entries

try again!

  • Best score: 23
  • Best player score: 24
  • Number of attempts: 5
Roger Stoltz
Twitter:

entered into 29 challenges

contributed 0 challenges