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

delete swap - 1650 entries

delete all swap

  • Best score: 5
  • Best player score: 6
  • Position: #367 / 514
  • Number of attempts: 1
hello-world-vimgolf - 2472 entries

Simple number generation

  • Best score: 10
  • Best player score: 10
  • Position: #7 / 699
  • Number of attempts: 3
Making 3 line function a one liner. - 312 entries

Simple challenge for frequent action while programming.

  • Best score: 4
  • Best player score: 4
  • Position: #8 / 200
  • Number of attempts: 1
HS Final exam vimgolf - 892 entries

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

  • Best score: 21
  • Best player score: 28
  • Position: #130 / 234
  • Number of attempts: 1
Rural Post - 4425 entries

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

  • Best score: 9
  • Best player score: 13
  • Position: #542 / 1085
  • Number of attempts: 1
Add quotes to ansible playbook - 946 entries

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

  • Best score: 8
  • Best player score: 12
  • Position: #282 / 302
  • Number of attempts: 1
Multiline to Single Line - 680 entries

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

  • Best score: 5
  • Best player score: 7
  • Position: #267 / 298
  • Number of attempts: 1
Yo To Hello - 1127 entries

Simply Turn Yo To Hello

  • Best score: 10
  • Best player score: 12
  • Position: #447 / 522
  • Number of attempts: 1
Simple, Practical, and Common - 33483 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
  • Position: #6255 / 7384
  • Number of attempts: 1
prepend * to every non-blank line - 6254 entries

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

  • Best score: 10
  • Best player score: 13
  • Position: #830 / 1530
  • Number of attempts: 2
Unsemantic linewrapping - 901 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
  • Position: #197 / 226
  • Number of attempts: 1
Swap the operands under comparison - 274 entries

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

  • Best score: 19
  • Best player score: 37
  • Position: #91 / 99
  • Number of attempts: 1
Add semicolons - 10831 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 11
  • Position: #1558 / 3055
  • Number of attempts: 3
Bad Copy Syntax - 2009 entries

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

  • Best score: 18
  • Best player score: 32
  • Position: #438 / 518
  • Number of attempts: 1
Split line with dots - 2131 entries

This line is too long, split it.

  • Best score: 15
  • Best player score: 30
  • Position: #595 / 633
  • Number of attempts: 1
Com(m)a Trouble - 3709 entries

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

  • Best score: 12
  • Best player score: 18
  • Position: #570 / 838
  • Number of attempts: 2
Box it - 7849 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 29
  • Position: #1280 / 1870
  • Number of attempts: 1
Array propagate - 332 entries

Complete the array with the keys as part of the value

  • Best score: 23
  • Best player score: 41
  • Position: #104 / 117
  • Number of attempts: 1
Team names - 1812 entries

The team names are misspelled.

  • Best score: 16
  • Best player score: 20
  • Position: #465 / 585
  • Number of attempts: 1
Stairstep digits - 383 entries

Remove the evens. Double the odds.

  • Best score: 9
  • Best player score: 13
  • Position: #64 / 143
  • Number of attempts: 2
Missing Library and a Typo - 860 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: 14
  • Best player score: 23
  • Position: #183 / 211
  • Number of attempts: 1
Create a table - 332 entries

Convert the given input into a formatted table

  • Best score: 16
  • Best player score: 24
  • Position: #92 / 105
  • Number of attempts: 1
A grid of punctuation - 127 entries

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

  • Best score: 16
  • Best player score: 21
  • Position: #51 / 59
  • Number of attempts: 2
One to Ten - 2174 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
  • Position: #508 / 664
  • Number of attempts: 1
Line under headers - 2023 entries

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

  • Best score: 24
  • Best player score: 37
  • Position: #398 / 498
  • Number of attempts: 1
Around the clock - 191 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
  • Position: #71 / 76
  • Number of attempts: 1
Join 'em - 251 entries

This shouldn't be too tough

  • Best score: 4
  • Best player score: 7
  • Position: #148 / 151
  • Number of attempts: 1
Delete to the end of the current line - 795 entries

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

  • Best score: 5
  • Best player score: 6
  • Position: #279 / 387
  • Number of attempts: 2
Song Transcription Oops - 236 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
  • Position: #66 / 77
  • Number of attempts: 1
change parenthesis - 287 entries

change the pair of braces into a pair of parentheses

  • Best score: 9
  • Best player score: 10
  • Position: #107 / 160
  • Number of attempts: 1
Put the months in order - 972 entries

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

  • Best score: 20
  • Best player score: 50
  • Position: #123 / 161
  • Number of attempts: 1
Array transposition - 2407 entries

Transpose two arrays into one.

  • Best score: 16
  • Best player score: 74
  • Position: #436 / 445
  • Number of attempts: 1
convert yml into java pojo field - 837 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
  • Position: #186 / 225
  • Number of attempts: 1
unknown command - 166 entries

I want change 5 words

  • Best score: 7
  • Best player score: 7
  • Position: #18 / 86
  • Number of attempts: 2
Array Transposition - 178 entries

Transpose four arrays into two.

  • Best score: 27
  • Best player score: 55
  • Position: #45 / 54
  • Number of attempts: 1
citizen_hacks_2019_challenge1 - 50 entries

For the Citizen Hacks 2019 Vim competition

  • Best score: 5
  • Best player score: 5
  • Position: #10 / 44
  • Number of attempts: 2
Miki Tebeka
Twitter:

CEO of 353solutions. We deliver world class, effective, hands-on workshops. https://t.co/8buqm35iGh

entered into 36 challenges

contributed 0 challenges