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

Convert the data to a python dictionary

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

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

  • Best score: 24
  • Best player score: 42
  • Position: #274 / 334
  • Number of attempts: 3
delete swap - 1650 entries

delete all swap

  • Best score: 5
  • Best player score: 10
  • Position: #420 / 514
  • Number of attempts: 1
Plotting some variables in python - 1605 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: #202 / 345
  • Number of attempts: 1
swap number pairs - 2023 entries

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

  • Best score: 16
  • Best player score: 32
  • Position: #267 / 373
  • Number of attempts: 1
Rural Post - 4427 entries

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

  • Best score: 9
  • Best player score: 9
  • Position: #172 / 1086
  • Number of attempts: 4
Satisfy the go linter - 2360 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 / 465
  • Number of attempts: 7
Simple, Practical, and Common - 33483 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 / 7384
  • Number of attempts: 13
Swap values - 4554 entries

Well, swap the values...

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

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

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

Just give me the numbers.

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

Easy challenge.

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

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

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

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

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

Simply add a semicolon at the end of each line

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

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

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

This line is too long, split it.

  • Best score: 15
  • Best player score: 18
  • Position: #311 / 633
  • Number of attempts: 5
remove lines containing the word "reader" - 3556 entries

easy stuff

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

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

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

Create a box around a line.

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

AaAaAaA

  • Best score: 12
  • Best player score: 12
  • Position: #79 / 702
  • Number of attempts: 11
Copy three lines - 2869 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 / 639
  • Number of attempts: 12
Extract argument from function - 2337 entries

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

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

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

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

"vim vi improved"

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

Delete the instructions at the top and bottom.

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

The team names are misspelled.

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

Renumbering Basic.

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

Little role switching.

  • Best score: 12
  • Best player score: 12
  • Position: #595 / 2114
  • Number of attempts: 6
One to Ten - 2174 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 / 664
  • Number of attempts: 5
Line under headers - 2023 entries

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

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

Transpose two arrays into one.

  • Best score: 16
  • Best player score: 17
  • Position: #171 / 445
  • Number of attempts: 15
Collect List - 4267 entries

Convert to comma separated list.

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

Put 3 spaces between adjacent letters.

  • Best score: 15
  • Best player score: 21
  • Position: #293 / 442
  • Number of attempts: 4
I forgot quotes - 15946 entries

Oops.

  • Best score: 10
  • Best player score: 14
  • Position: #2024 / 4166
  • Number of attempts: 5
-a-b-c- - 3183 entries

Put hyphens everywhere.

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

A HAPPY NEW YEAR 2014 !

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

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

  • Best score: 19
  • Best player score: 19
  • Position: #174 / 695
  • Number of attempts: 20
Letter case trickery - 1598 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 / 514
  • Number of attempts: 5
quotes inside quotes - 3128 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 / 1073
  • Number of attempts: 8
Words in parens - 12868 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #1159 / 3950
  • Number of attempts: 4
Saving the hashes(#) - 2008 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: #418 / 476
  • Number of attempts: 3
Vertical Limit - 2487 entries

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

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

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

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

How to switch two arguments of a function.

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

how fast can you switch two variable ?

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

Insert blank lines to make it more organized and readable

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

Pretty simple, number the list.

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

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

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

Flimsy Giraffe

entered into 52 challenges

contributed 0 challenges