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, Practical, and Common - 31292 entries

Simple things we do all the time should be able to be done with very few keystrokes, but sometimes I find something I need to do makes me go, "There MUST be a better way." This challenge is just a simple movement and entering text at a certain place.

  • Best score: 22
  • Best player score: 34
  • Number of attempts: 1
citizen_hacks_2019_challenge1 - 29 entries

For the Citizen Hacks 2019 Vim competition

  • Best score: 5
  • Best player score: 5
  • Number of attempts: 2
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: 17
  • Number of attempts: 1
Team names - 1675 entries

The team names are misspelled.

  • Best score: 16
  • Best player score: 20
  • Number of attempts: 1
Create a table - 264 entries

Convert the given input into a formatted table

  • Best score: 16
  • Best player score: 24
  • Number of attempts: 1
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: 15
  • Number of attempts: 1
Split line with dots - 2029 entries

This line is too long, split it.

  • Best score: 15
  • Best player score: 30
  • Number of attempts: 1
convert yml into java pojo field - 784 entries

How fast vim can create fields for java pojo i.e class declaration referring to a (simple) yml file

  • Best score: 29
  • Best player score: 36
  • Number of attempts: 1
Com(m)a Trouble - 2979 entries

Someone was real stupid when placing his commas. Can you fix it?

  • Best score: 12
  • Best player score: 18
  • Number of attempts: 2
A grid of punctuation - 112 entries

Create a checkerboard of = and - in an 80×24 grid!

  • Best score: 16
  • Best player score: 21
  • Number of attempts: 2
Add quotes to ansible playbook - 281 entries

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

  • Best score: 8
  • Best player score: 12
  • 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: 27
  • Number of attempts: 1
Add semicolons - 8994 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 11
  • Number of attempts: 3
Array Transposition - 160 entries

Transpose four arrays into two.

  • Best score: 27
  • Best player score: 55
  • Number of attempts: 1
Join 'em - 192 entries

This shouldn't be too tough

  • Best score: 4
  • Best player score: 7
  • Number of attempts: 1
Bad Copy Syntax - 1725 entries

Copy should be from right to left, but sometimes you type it wrong.

  • Best score: 10
  • Best player score: 32
  • Number of attempts: 1
Put the months in order - 796 entries

Our contractor thought that months should be in alphabetical order. Put them in calendar order please.

  • Best score: 20
  • Best player score: 50
  • Number of attempts: 1
Multiline to Single Line - 175 entries

Convert a multiline, indented file to a single line with no whitespace

  • Best score: 5
  • Best player score: 7
  • Number of attempts: 1
Box it - 6822 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 29
  • Number of attempts: 1
Yo To Hello - 618 entries

Simply Turn Yo To Hello

  • Best score: 10
  • Best player score: 12
  • 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: 13
  • Number of attempts: 2
Rural Post - 1441 entries

Simple challenge to remove all but the post code on each line

  • Best score: 9
  • Best player score: 13
  • Number of attempts: 1
Line under headers - 1623 entries

Put a line under each header, and remove the other markdown formatting.

  • Best score: 24
  • Best player score: 37
  • Number of attempts: 1
unknown command - 119 entries

I want change 5 words

  • Best score: 7
  • Best player score: 7
  • Number of attempts: 2
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: 15
  • Number of attempts: 1
Missing Library and a Typo - 784 entries

I forgot to add a c library, please add it for me. Also I'm bad at typing so fix my typo too.

  • Best score: 15
  • Best player score: 23
  • Number of attempts: 1
change parenthesis - 220 entries

change the pair of braces into a pair of parentheses

  • Best score: 9
  • Best player score: 10
  • Number of attempts: 1
Array propagate - 268 entries

Complete the array with the keys as part of the value

  • Best score: 23
  • Best player score: 41
  • Number of attempts: 1
Array transposition - 2084 entries

Transpose two arrays into one.

  • Best score: 16
  • Best player score: 74
  • Number of attempts: 1
Stairstep digits - 227 entries

Remove the evens. Double the odds.

  • Best score: 9
  • Best player score: 13
  • Number of attempts: 2
Swap the operands under comparison - 240 entries

Swap the operands under comparison to prevent null pointer exception (at least in java)

  • Best score: 19
  • Best player score: 37
  • Number of attempts: 1
Delete to the end of the current line - 691 entries

Delete to the end of the current line, but keep the character under the cursor.

  • Best score: 5
  • Best player score: 6
  • Number of attempts: 2
Miki Tebeka
Twitter:

CEO of 353solutions. We deliver world class, effective, hands-on workshops.

entered into 32 challenges

contributed 0 challenges