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

Rural Post - 4224 entries

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

  • Best score: 9
  • Best player score: 9
  • Position: #172 / 1040
  • Number of attempts: 3
Satisfy the go linter - 2047 entries

You just came up with this briliant go vars package. But dang, you forgot to add comments to the exported variables. Can you add a comment over each variable with a TODO-placeholder?

  • Best score: 20
  • Best player score: 20
  • Position: #117 / 418
  • Number of attempts: 7
Simple, Practical, and Common - 33100 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: #2350 / 7301
  • Number of attempts: 11
Swap values - 4500 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 11
  • Position: #350 / 1247
  • Number of attempts: 6
prepend * to every non-blank line - 6096 entries

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

  • Best score: 10
  • Best player score: 10
  • Position: #412 / 1489
  • Number of attempts: 5
One number per line - 18478 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 14
  • Position: #742 / 3810
  • Number of attempts: 8
Swap values inside brackets - 2441 entries

Easy challenge.

  • Best score: 14
  • Best player score: 14
  • Position: #104 / 564
  • Number of attempts: 6
V to the i - 4650 entries

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

  • Best score: 7
  • Best player score: 7
  • Position: #777 / 1863
  • Number of attempts: 2
Applying same text modification in several lines - 2792 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #11 / 826
  • Number of attempts: 4
Add semicolons - 10716 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 10
  • Position: #733 / 3022
  • Number of attempts: 3
Bad Copy Syntax - 1950 entries

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

  • Best score: 18
  • Best player score: 18
  • Position: #29 / 501
  • Number of attempts: 4
Split line with dots - 2113 entries

This line is too long, split it.

  • Best score: 15
  • Best player score: 18
  • Position: #310 / 625
  • Number of attempts: 2
remove lines containing the word "reader" - 3480 entries

easy stuff

  • Best score: 9
  • Best player score: 9
  • Position: #481 / 1127
  • Number of attempts: 3
Com(m)a Trouble - 3484 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #147 / 782
  • Number of attempts: 10
Box it - 7725 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 21
  • Position: #441 / 1844
  • Number of attempts: 3
Every other line - 2856 entries

AaAaAaA

  • Best score: 12
  • Best player score: 12
  • Position: #79 / 691
  • Number of attempts: 11
Copy three lines - 2824 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #179 / 630
  • Number of attempts: 11
Extract argument from function - 2267 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #258 / 736
  • Number of attempts: 6
Search and Replace 0 - 4743 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #684 / 1572
  • Number of attempts: 5
That hyphen - 2522 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 9
  • Position: #235 / 689
  • Number of attempts: 6
Just the middle - 11283 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 7
  • Position: #1477 / 4140
  • Number of attempts: 3
Team names - 1790 entries

The team names are misspelled.

  • Best score: 16
  • Best player score: 16
  • Position: #276 / 575
  • Number of attempts: 4
Basic renumbering - 5486 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 11
  • Position: #257 / 1243
  • Number of attempts: 11
Vice versa - 7620 entries

Little role switching.

  • Best score: 12
  • Best player score: 12
  • Position: #595 / 2067
  • Number of attempts: 6
One to Ten - 2122 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: #342 / 649
  • Number of attempts: 5
Line under headers - 1933 entries

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

  • Best score: 24
  • Best player score: 24
  • Position: #14 / 476
  • Number of attempts: 8
Array transposition - 2321 entries

Transpose two arrays into one.

  • Best score: 16
  • Best player score: 17
  • Position: #166 / 434
  • Number of attempts: 15
Collect List - 4212 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 12
  • Position: #516 / 1176
  • Number of attempts: 4
Space out the alphabet - 1602 entries

Put 3 spaces between adjacent letters.

  • Best score: 15
  • Best player score: 21
  • Position: #289 / 436
  • Number of attempts: 4
I forgot quotes - 15840 entries

Oops.

  • Best score: 10
  • Best player score: 14
  • Position: #2012 / 4133
  • Number of attempts: 5
-a-b-c- - 3142 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 13
  • Position: #306 / 1120
  • Number of attempts: 7
Don't know what this is - 1959 entries

Replace contents of brackets with matching number of spaces. Don't ask what the format's supposed to be.

  • Best score: 11
  • Best player score: 11
  • Position: #129 / 574
  • Number of attempts: 8
A HAPPY NEW YEAR 2014 ! - 10564 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Position: #1581 / 3646
  • Number of attempts: 4
attr_aligner - 3403 entries

Two attr keywords. Two separate indentations. Align the colons.

  • Best score: 19
  • Best player score: 19
  • Position: #174 / 686
  • Number of attempts: 18
Letter case trickery - 1580 entries

This file is in a downright esoteric format, consisting of hexadecimal numbers, non-hexadecimal keywords, and "Z" indicating end-of-line. Make the hexadecimal numbers lowercase.

  • Best score: 9
  • Best player score: 9
  • Position: #34 / 506
  • Number of attempts: 5
quotes inside quotes - 3077 entries

taken from tip 85 of the very good book 'Practical Vim: Edit Text at the Speed of Thought' ! I'd be interested what people use :)

  • Best score: 14
  • Best player score: 14
  • Position: #348 / 1057
  • Number of attempts: 8
Words in parens - 12788 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #1154 / 3930
  • Number of attempts: 4
Saving the hashes(#) - 1973 entries

The following file is copied from vimcasts.org(Its only for learning purpose,hope the site owner doesn't mind it), its probably the easiest of challenges.Our goal is to delete every line which doesn't contain a hash signs. The remaining hash signs with numbers are then sorted to get the final output.

  • Best score: 20
  • Best player score: 32
  • Position: #413 / 468
  • Number of attempts: 3
Vertical Limit - 2389 entries

transform a succession of one word lines to a an array of strings

  • Best score: 21
  • Best player score: 21
  • Position: #95 / 724
  • Number of attempts: 9
replacing each line of a block selection - 2883 entries

replace each line's ../assets/js with /javascripts

  • Best score: 18
  • Best player score: 18
  • Position: #125 / 756
  • Number of attempts: 7
Switch function arguments - 2002 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 12
  • Position: #316 / 634
  • Number of attempts: 6
switch variable - 4993 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 11
  • Position: #647 / 1722
  • Number of attempts: 6
Make it more readable - 1928 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 13
  • Position: #106 / 635
  • Number of attempts: 5
Numbering a List - 1845 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 13
  • Position: #65 / 634
  • Number of attempts: 1
Shebangs for all - 1792 entries

We've all seen or used a shebang once or twice. Ditch the specific paths and leave just a dynamic Ruby and Python bath behind.

  • Best score: 11
  • Best player score: 11
  • Position: #63 / 473
  • Number of attempts: 5
Whitespace, empty lines and tabs - 3099 entries

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

  • Best score: 16
  • Best player score: 16
  • Position: #22 / 687
  • Number of attempts: 13
Simple text editing with Vim - 11856 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #663 / 3469
  • Number of attempts: 2
Flimsy Giraffe
Twitter:

Flimsy Giraffe

entered into 47 challenges

contributed 0 challenges