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 - 4105 entries

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

  • Best score: 9
  • Best player score: 9
  • Position: #172 / 1015
  • Number of attempts: 3
Satisfy the go linter - 2007 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 / 404
  • Number of attempts: 7
Simple, Practical, and Common - 32904 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: #2351 / 7270
  • Number of attempts: 11
Swap values - 4440 entries

Well, swap the values...

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

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

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

Just give me the numbers.

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

Easy challenge.

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

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

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

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

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

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 10
  • Position: #734 / 2988
  • Number of attempts: 3
Bad Copy Syntax - 1938 entries

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

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

This line is too long, split it.

  • Best score: 15
  • Best player score: 18
  • Position: #309 / 622
  • Number of attempts: 2
remove lines containing the word "reader" - 3454 entries

easy stuff

  • Best score: 9
  • Best player score: 9
  • Position: #482 / 1121
  • Number of attempts: 3
Com(m)a Trouble - 3376 entries

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

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

Create a box around a line.

  • Best score: 21
  • Best player score: 21
  • Position: #442 / 1835
  • Number of attempts: 3
Every other line - 2829 entries

AaAaAaA

  • Best score: 12
  • Best player score: 12
  • Position: #79 / 686
  • Number of attempts: 11
Copy three lines - 2794 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 / 625
  • Number of attempts: 11
Extract argument from function - 2215 entries

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

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

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

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

"vim vi improved"

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

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 7
  • Position: #1478 / 4112
  • Number of attempts: 3
Team names - 1777 entries

The team names are misspelled.

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

Renumbering Basic.

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

Little role switching.

  • Best score: 12
  • Best player score: 12
  • Position: #595 / 2043
  • Number of attempts: 6
One to Ten - 2093 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 / 641
  • Number of attempts: 5
Line under headers - 1918 entries

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

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

Transpose two arrays into one.

  • Best score: 16
  • Best player score: 17
  • Position: #165 / 431
  • Number of attempts: 15
Collect List - 4178 entries

Convert to comma separated list.

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

Put 3 spaces between adjacent letters.

  • Best score: 15
  • Best player score: 21
  • Position: #287 / 433
  • Number of attempts: 4
I forgot quotes - 15728 entries

Oops.

  • Best score: 10
  • Best player score: 14
  • Position: #2004 / 4114
  • Number of attempts: 5
-a-b-c- - 3118 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 13
  • Position: #306 / 1112
  • Number of attempts: 7
Don't know what this is - 1948 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 / 571
  • Number of attempts: 8
A HAPPY NEW YEAR 2014 ! - 10533 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Position: #1582 / 3637
  • Number of attempts: 4
attr_aligner - 3402 entries

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

  • Best score: 19
  • Best player score: 19
  • Position: #174 / 685
  • Number of attempts: 18
Letter case trickery - 1547 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 / 498
  • Number of attempts: 5
quotes inside quotes - 3026 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 / 1044
  • Number of attempts: 8
Words in parens - 12736 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #1151 / 3919
  • Number of attempts: 4
Saving the hashes(#) - 1961 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: #411 / 466
  • Number of attempts: 3
Vertical Limit - 2367 entries

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

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

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

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

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 12
  • Position: #313 / 627
  • Number of attempts: 6
switch variable - 4917 entries

how fast can you switch two variable ?

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

Insert blank lines to make it more organized and readable

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

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 13
  • Position: #65 / 625
  • Number of attempts: 1
Shebangs for all - 1771 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 / 467
  • Number of attempts: 5
Whitespace, empty lines and tabs - 2979 entries

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

  • Best score: 16
  • Best player score: 16
  • Position: #22 / 663
  • Number of attempts: 13
Simple text editing with Vim - 11624 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 / 3410
  • Number of attempts: 2
Flimsy Giraffe
Twitter:

Flimsy Giraffe

entered into 47 challenges

contributed 0 challenges