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

Sort and Tag - 202 entries

The goal is to sort these lines alphabetically, assign a unique identifier to each line in the format "[01]", "[02]", etc., and then restore the original order of the lines while preserving the assigned identifiers.

  • Best score: 36
  • Best player score: 92
  • Position: #35 / 55
  • Number of attempts: 2
Rural Post - 4515 entries

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

  • Best score: 9
  • Best player score: 10
  • Position: #485 / 1106
  • Number of attempts: 1
Simple, Practical, and Common - 33722 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: 25
  • Position: #3430 / 7442
  • Number of attempts: 4
prepend * to every non-blank line - 6332 entries

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

  • Best score: 10
  • Best player score: 11
  • Position: #763 / 1545
  • Number of attempts: 1
One number per line - 18755 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 20
  • Position: #2315 / 3870
  • Number of attempts: 4
Add semicolons - 10881 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 11
  • Position: #1785 / 3072
  • Number of attempts: 3
remove lines containing the word "reader" - 3604 entries

easy stuff

  • Best score: 9
  • Best player score: 10
  • Position: #868 / 1169
  • Number of attempts: 2
Wrap the text of an email message to 79 characters - 799 entries

You're replying to an email with silly long lines. Clean them up.

  • Best score: 5
  • Best player score: 5
  • Position: #323 / 421
  • Number of attempts: 2
Box it - 7916 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 24
  • Position: #980 / 1881
  • Number of attempts: 3
Search and Replace 0 - 5004 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #748 / 1630
  • Number of attempts: 1
I forgot quotes - 16014 entries

Oops.

  • Best score: 10
  • Best player score: 15
  • Position: #2394 / 4188
  • Number of attempts: 2
Insert a Markdown link - 450 entries

Put a link in a markdown document, using the after-the-paragraph format.

  • Best score: 22
  • Best player score: 25
  • Position: #92 / 149
  • Number of attempts: 3
Getters & Setters: Java - 211 entries

Boilerplate getters & setters - it's a tedious fact of life in Java, and probably the only thing that still pulls me back to an IDE. Perhaps someone knows a fast, pure vim way...

  • Best score: 89
  • Best player score: 122
  • Position: #36 / 59
  • Number of attempts: 4
A Simple One - 1057 entries

Here is a very simple one - just to illustrate/introduce a vim feature that some people seem to miss...

  • Best score: 9
  • Best player score: 9
  • Position: #590 / 667
  • Number of attempts: 1
Table Reshuffle - 439 entries

Fix the column order in this table... also append the new 'username' column.

  • Best score: 22
  • Best player score: 39
  • Position: #106 / 142
  • Number of attempts: 3
Reverse Simple Deletion - 854 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 12
  • Position: #377 / 460
  • Number of attempts: 3
Increment, increment, increment.... - 692 entries

Vim likes macros

  • Best score: 10
  • Best player score: 10
  • Position: #73 / 410
  • Number of attempts: 1
Indentation - 550 entries

Indent each line according to the right number of spaces it needs.

  • Best score: 20
  • Best player score: 32
  • Position: #139 / 180
  • Number of attempts: 2
Dumb to smart - 100 entries

Turn dumb quote to smart vim's way.

  • Best score: 28
  • Best player score: 37
  • Position: #44 / 57
  • Number of attempts: 1
The Cake is a Lie - 1361 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 9
  • Position: #289 / 531
  • Number of attempts: 3
Remember FizzBuzz? - 738 entries

Output FizzBuzz to 100. Start with nothing.

  • Best score: 39
  • Best player score: 69
  • Position: #148 / 193
  • Number of attempts: 5
Get rid of html tags - 407 entries

Want to read more about Vim's background? Then get rid of those html tags...

  • Best score: 12
  • Best player score: 17
  • Position: #136 / 236
  • Number of attempts: 1
Change the content of a string - 1591 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 22
  • Position: #241 / 593
  • Number of attempts: 2
Deleting folded text - 386 entries

The text below contains three folds. Delete them (and the text inside them). For example: 123 456 /*{{{*/ 789 /*}}}*/ 012 Should become: 123 012 Also, add `aoeuaoeu` to make sure small solutions don't get flagged as cheating.

  • Best score: 17
  • Best player score: 21
  • Position: #78 / 121
  • Number of attempts: 8
Sort and add attributes - 1477 entries

Sort the states and add the attribute country to each record.

  • Best score: 33
  • Best player score: 33
  • Position: #297 / 575
  • Number of attempts: 1
Reconstruct the Sentence - 1589 entries

Get the sentence back in the proper order, remove duplicate lines, and then combine the separate lines into one.

  • Best score: 19
  • Best player score: 20
  • Position: #156 / 425
  • Number of attempts: 3
Braces or Brackets? - 1054 entries

Someone forgot whether to use braces or brackets and you have to clean up their code!

  • Best score: 34
  • Best player score: 53
  • Position: #267 / 324
  • Number of attempts: 1
Whitespace, empty lines and tabs - 3742 entries

Convert tabs to spaces, strip empty lines and trailing whitespace.

  • Best score: 16
  • Best player score: 34
  • Position: #679 / 803
  • Number of attempts: 3
Flodder-challenge - 1325 entries

Replace the text the most efficient and win!

  • Best score: 27
  • Best player score: 37
  • Position: #214 / 346
  • Number of attempts: 3
Simple text editing with Vim - 12971 entries

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

  • Best score: 13
  • Best player score: 20
  • Position: #2866 / 3733
  • Number of attempts: 2
Colin Benner
Github:

entered into 30 challenges

contributed 0 challenges