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

Quicksort - 2001 entries

We need the numbers in the first row sorted as quickly as possible! Be careful not to disturb the data below the divider though: that must remain unchanged.

  • Best score: 6
  • Best player score: 6
  • Position: #104 / 439
  • Number of attempts: 8
Poorly indented Python comments - 1315 entries

Fix the alignment of some Python comments as quickly as possible.

  • Best score: 15
  • Best player score: 23
  • Position: #88 / 221
  • Number of attempts: 17
Fix the shell script! - 2551 entries

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 39
  • Position: #389 / 592
  • Number of attempts: 2
Inverting Lines - 1900 entries

A simple challenge to invert all lines, except the first.

  • Best score: 10
  • Best player score: 13
  • Position: #348 / 511
  • Number of attempts: 4
Modernise code - 1400 entries

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 60
  • Position: #287 / 323
  • Number of attempts: 2
Rural Post - 4504 entries

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

  • Best score: 9
  • Best player score: 10
  • Position: #472 / 1104
  • Number of attempts: 6
Simple, Practical, and Common - 33713 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: 24
  • Position: #3117 / 7439
  • Number of attempts: 6
Swap values - 4639 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 12
  • Position: #525 / 1273
  • Number of attempts: 4
prepend * to every non-blank line - 6325 entries

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

  • Best score: 10
  • Best player score: 15
  • Position: #1001 / 1543
  • Number of attempts: 3
V to the i - 4813 entries

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

  • Best score: 7
  • Best player score: 7
  • Position: #792 / 1897
  • Number of attempts: 2
Applying same text modification in several lines - 2890 entries

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

  • Best score: 12
  • Best player score: 14
  • Position: #494 / 855
  • Number of attempts: 5
Add semicolons - 10877 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 12
  • Position: #1959 / 3070
  • Number of attempts: 4
Split line with dots - 2154 entries

This line is too long, split it.

  • Best score: 15
  • Best player score: 22
  • Position: #473 / 635
  • Number of attempts: 1
remove lines containing the word "reader" - 3597 entries

easy stuff

  • Best score: 9
  • Best player score: 9
  • Position: #495 / 1167
  • Number of attempts: 4
Com(m)a Trouble - 3864 entries

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

  • Best score: 12
  • Best player score: 16
  • Position: #516 / 872
  • Number of attempts: 6
Box it - 7915 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 22
  • Position: #554 / 1880
  • Number of attempts: 9
Search and Replace 0 - 5004 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #718 / 1630
  • Number of attempts: 3
That hyphen - 2595 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 11
  • Position: #379 / 701
  • Number of attempts: 5
Make HTML List - 1050 entries

Turn the comma separated list into an unordered html list.

  • Best score: 33
  • Best player score: 39
  • Position: #88 / 273
  • Number of attempts: 12
Vice versa - 7937 entries

Little role switching.

  • Best score: 12
  • Best player score: 12
  • Position: #616 / 2136
  • Number of attempts: 12
One to Ten - 2225 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
  • Position: #357 / 676
  • Number of attempts: 12
Array transposition - 2425 entries

Transpose two arrays into one.

  • Best score: 16
  • Best player score: 17
  • Position: #173 / 449
  • Number of attempts: 13
I forgot quotes - 16014 entries

Oops.

  • Best score: 10
  • Best player score: 14
  • Position: #2040 / 4188
  • Number of attempts: 4
A HAPPY NEW YEAR 2014 ! - 10676 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Position: #1603 / 3687
  • Number of attempts: 5
switch variable - 5079 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 12
  • Position: #1007 / 1749
  • Number of attempts: 3
Whitespace, empty lines and tabs - 3734 entries

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

  • Best score: 16
  • Best player score: 18
  • Position: #186 / 801
  • Number of attempts: 10
Simple text editing with Vim - 12939 entries

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

  • Best score: 13
  • Best player score: 35
  • Position: #3514 / 3726
  • Number of attempts: 1
Reformat/Refactor a Golfer Class - 7102 entries

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

  • Best score: 28
  • Best player score: 37
  • Position: #582 / 1743
  • Number of attempts: 5
rayx
Github:

entered into 28 challenges

contributed 0 challenges