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 - 33614 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: 22
  • Position: #232 / 7418
  • Number of attempts: 4
Swap values - 4616 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 12
  • Position: #362 / 1268
  • Number of attempts: 2
prepend * to every non-blank line - 6308 entries

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

  • Best score: 10
  • Best player score: 14
  • Position: #859 / 1537
  • Number of attempts: 2
Swap values inside brackets - 2493 entries

Easy challenge.

  • Best score: 14
  • Best player score: 15
  • Position: #166 / 578
  • Number of attempts: 3
V to the i - 4802 entries

Input is 99 V's. Output is 100 i's.

  • Best score: 7
  • Best player score: 7
  • Position: #213 / 1893
  • Number of attempts: 3
Applying same text modification in several lines - 2877 entries

Remove identical text at the beginning of several lines and the closing parenthesis.

  • Best score: 12
  • Best player score: 14
  • Position: #332 / 850
  • Number of attempts: 1
Add semicolons - 10851 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 11
  • Position: #1175 / 3063
  • Number of attempts: 1
remove lines containing the word "reader" - 3583 entries

easy stuff

  • Best score: 9
  • Best player score: 9
  • Position: #341 / 1161
  • Number of attempts: 3
citizen_hacks_2019_challenge3 - 38 entries

For the Citizen Hacks 2019 Vim competition.

  • Best score: 4
  • Best player score: 4
  • Position: #3 / 35
  • Number of attempts: 1
Box it - 7904 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 21
  • Position: #24 / 1875
  • Number of attempts: 3
Copy three lines - 2872 entries

If the site is up (by some miracle), make the text under every header identical.

  • Best score: 13
  • Best player score: 17
  • Position: #281 / 640
  • Number of attempts: 3
Extract argument from function - 2357 entries

The aim is to see if you can do some refactoring very fast.

  • Best score: 13
  • Best player score: 14
  • Position: #337 / 753
  • Number of attempts: 3
Search and Replace 0 - 4989 entries

Replace every instance of 'aaa' with 'xaaax'.

  • Best score: 12
  • Best player score: 12
  • Position: #387 / 1624
  • Number of attempts: 2
Flip the bit - 130 entries

Change the specific 0 to a 1.

  • Best score: 7
  • Best player score: 10
  • Position: #51 / 74
  • Number of attempts: 1
Just the middle - 11454 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #2758 / 4197
  • Number of attempts: 4
Make HTML List - 1050 entries

Turn the comma separated list into an unordered html list.

  • Best score: 33
  • Best player score: 40
  • Position: #90 / 273
  • Number of attempts: 2
Learn some german verbs - 533 entries

The list needs to be structured so we can print in verbatim and feel ok about how it looks.

  • Best score: 21
  • Best player score: 24
  • Position: #71 / 133
  • Number of attempts: 1
Fiddle percentages into real numbers - 865 entries

Get rid of the '%' symbols and shift the decimal place. This is the easier version - all the columns line up.

  • Best score: 13
  • Best player score: 16
  • Position: #196 / 291
  • Number of attempts: 2
Combines all items - 313 entries

For each line that starts with the same number I want to combine its contents

  • Best score: 9
  • Best player score: 10
  • Position: #118 / 140
  • Number of attempts: 1
Vice versa - 7904 entries

Little role switching.

  • Best score: 12
  • Best player score: 16
  • Position: #1182 / 2126
  • Number of attempts: 2
C Reformatting - 690 entries

You may use Visual mode... or not. #uppercase

  • Best score: 30
  • Best player score: 73
  • Position: #146 / 163
  • Number of attempts: 1
lipsum lines - 278 entries

Convert a quoted block of text into strings in a list.

  • Best score: 28
  • Best player score: 32
  • Position: #52 / 95
  • Number of attempts: 3
citizen_hacks_2019_challenge4 - 95 entries

For the Citizen Hacks 2019 Vim competition.

  • Best score: 5
  • Best player score: 5
  • Position: #1 / 65
  • Number of attempts: 1
citizen_hacks_2019_challenge5 - 147 entries

For the Citizen Hacks 2019 Vim competition.

  • Best score: 6
  • Best player score: 7
  • Position: #54 / 77
  • Number of attempts: 1
Line under headers - 2041 entries

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

  • Best score: 24
  • Best player score: 27
  • Position: #152 / 502
  • Number of attempts: 3
Build a six - 294 entries

Just enjoy building "a" floors...

  • Best score: 22
  • Best player score: 22
  • Position: #25 / 95
  • Number of attempts: 2
unknown command - 167 entries

I want change 5 words

  • Best score: 7
  • Best player score: 7
  • Position: #10 / 87
  • Number of attempts: 1
Space out the alphabet - 1657 entries

Put 3 spaces between adjacent letters.

  • Best score: 15
  • Best player score: 19
  • Position: #245 / 444
  • Number of attempts: 1
Shuffled numbers - 246 entries

Each number is paired with the number it should follow. That's enough information to put them in order.

  • Best score: 15
  • Best player score: 18
  • Position: #90 / 96
  • Number of attempts: 1
I forgot quotes - 15980 entries

Oops.

  • Best score: 10
  • Best player score: 14
  • Position: #1803 / 4179
  • Number of attempts: 2
A HAPPY NEW YEAR 2014 ! - 10663 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Position: #725 / 3683
  • Number of attempts: 3
Words in parens - 12935 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 15
  • Position: #1504 / 3963
  • Number of attempts: 4
Santa's naughty / nice list - 90 entries

Christmas is here and Santa hasn't decided who's naughty or nice yet. He's given a list of names to his programmer friend to quickly split the children into naughty and nice. Hint: There's a hidden pattern that might be familiar.

  • Best score: 39
  • Best player score: 45
  • Position: #15 / 26
  • Number of attempts: 3
The Quick Brown Fox Jumps Over The Lazy Vim - 420 entries

Someone has vandalized this text file and replaced the beginning character of one word in each line with a Big "X." Please remove the big X's, and fix each line to read "The Quick Brown Fox Jumps Over The Lazy Dog."

  • Best score: 8
  • Best player score: 13
  • Position: #179 / 192
  • Number of attempts: 1
Chucking wood - 129 entries

An exercise in compressing repetitive text. For this challenge, any entry that uses keys outside the main row (such as arrow keys, Home, End, Delete, etc.) will be removed. (Esc is OK, though you should be using C-[ anyway.)

  • Best score: 51
  • Best player score: 57
  • Position: #23 / 49
  • Number of attempts: 3
Reverse Simple Deletion - 847 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 11
  • Position: #28 / 458
  • Number of attempts: 4
Increment, increment, increment.... - 688 entries

Vim likes macros

  • Best score: 10
  • Best player score: 12
  • Position: #320 / 408
  • Number of attempts: 1
Simple text editing with Vim - 12792 entries

Make the pairs of lines match up by making each second line same as first

  • Best score: 13
  • Best player score: 14
  • Position: #1438 / 3689
  • Number of attempts: 2
Reformat/Refactor a Golfer Class - 6972 entries

A simple case of removing unneeded code and fixing broken indentation.

  • Best score: 28
  • Best player score: 43
  • Position: #1041 / 1703
  • Number of attempts: 4
Marty Boren
Twitter:

entered into 39 challenges

contributed 0 challenges