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

HS exam question - 1506 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 58
  • Position: #105 / 394
  • Number of attempts: 3
Reformat symbols in list - 1466 entries

Saw this in some lecture, easy reformatting using multiple cursor in VS Code

  • Best score: 24
  • Best player score: 42
  • Position: #265 / 322
  • Number of attempts: 3
delete swap - 1522 entries

delete all swap

  • Best score: 5
  • Best player score: 10
  • Position: #391 / 476
  • Number of attempts: 1
Plotting some variables in python - 1557 entries

4 sets of (x,y) variables to plot. Just increment the numbers! Well, let's change the colors of the lines as well. Oh and we meant to plot the absolute values of course.

  • Best score: 34
  • Best player score: 49
  • Position: #195 / 332
  • Number of attempts: 1
swap number pairs - 2011 entries

Swap the numbers in a bunch of 2-element arrays.

  • Best score: 16
  • Best player score: 32
  • Position: #266 / 370
  • Number of attempts: 1
Rural Post - 4360 entries

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

  • Best score: 9
  • Best player score: 9
  • Position: #172 / 1070
  • Number of attempts: 4
Satisfy the go linter - 2328 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 / 456
  • Number of attempts: 7
Simple, Practical, and Common - 33379 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 / 7363
  • Number of attempts: 13
Swap values - 4543 entries

Well, swap the values...

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

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

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

Just give me the numbers.

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

Easy challenge.

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

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

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

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

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

Simply add a semicolon at the end of each line

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

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

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

This line is too long, split it.

  • Best score: 15
  • Best player score: 18
  • Position: #310 / 630
  • Number of attempts: 5
remove lines containing the word "reader" - 3537 entries

easy stuff

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

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

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

Create a box around a line.

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

AaAaAaA

  • Best score: 12
  • Best player score: 12
  • Position: #79 / 700
  • Number of attempts: 11
Copy three lines - 2840 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 / 635
  • Number of attempts: 12
Extract argument from function - 2314 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #258 / 744
  • Number of attempts: 9
Search and Replace 0 - 4790 entries

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

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

"vim vi improved"

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

Delete the instructions at the top and bottom.

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

The team names are misspelled.

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

Renumbering Basic.

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

Little role switching.

  • Best score: 12
  • Best player score: 12
  • Position: #595 / 2099
  • Number of attempts: 6
One to Ten - 2165 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 / 662
  • Number of attempts: 5
Line under headers - 2004 entries

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

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

Transpose two arrays into one.

  • Best score: 16
  • Best player score: 17
  • Position: #169 / 443
  • Number of attempts: 15
Collect List - 4264 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 12
  • Position: #516 / 1186
  • Number of attempts: 8
Space out the alphabet - 1627 entries

Put 3 spaces between adjacent letters.

  • Best score: 15
  • Best player score: 21
  • Position: #292 / 440
  • Number of attempts: 4
I forgot quotes - 15931 entries

Oops.

  • Best score: 10
  • Best player score: 14
  • Position: #2022 / 4161
  • Number of attempts: 5
-a-b-c- - 3176 entries

Put hyphens everywhere.

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

A HAPPY NEW YEAR 2014 !

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

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

  • Best score: 19
  • Best player score: 19
  • Position: #174 / 692
  • Number of attempts: 20
Letter case trickery - 1594 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 / 511
  • Number of attempts: 5
quotes inside quotes - 3125 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 / 1072
  • Number of attempts: 8
Words in parens - 12854 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #1158 / 3945
  • Number of attempts: 4
Saving the hashes(#) - 1992 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: #415 / 473
  • Number of attempts: 3
Vertical Limit - 2437 entries

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

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

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

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

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 12
  • Position: #322 / 651
  • Number of attempts: 6
switch variable - 5031 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 11
  • Position: #647 / 1735
  • Number of attempts: 7
Make it more readable - 1952 entries

Insert blank lines to make it more organized and readable

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

Pretty simple, number the list.

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

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

  • Best score: 16
  • Best player score: 16
  • Position: #22 / 735
  • Number of attempts: 13
Simple text editing with Vim - 12276 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 / 3578
  • Number of attempts: 3
Flimsy Giraffe
Twitter:

Flimsy Giraffe

entered into 52 challenges

contributed 0 challenges