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

hello-world-vimgolf - 2311 entries

Simple number generation

  • Best score: 10
  • Best player score: 79
  • Position: #630 / 653
  • Number of attempts: 1
Plotting some variables in python - 1543 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: 58
  • Position: #237 / 329
  • Number of attempts: 2
Inverting Lines - 1797 entries

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

  • Best score: 10
  • Best player score: 17
  • Position: #401 / 486
  • Number of attempts: 3
Simple, Practical, and Common - 33353 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: 25
  • Position: #3188 / 7358
  • Number of attempts: 3
One number per line - 18613 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 18
  • Position: #1368 / 3841
  • Number of attempts: 1
V to the i - 4743 entries

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

  • Best score: 7
  • Best player score: 9
  • Position: #1660 / 1878
  • Number of attempts: 1
Add semicolons - 10785 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 17
  • Position: #2568 / 3042
  • Number of attempts: 2
Split line with dots - 2124 entries

This line is too long, split it.

  • Best score: 15
  • Best player score: 15
  • Position: #95 / 629
  • Number of attempts: 6
Copy three lines - 2839 entries

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

  • Best score: 13
  • Best player score: 18
  • Position: #308 / 634
  • Number of attempts: 3
Extract argument from function - 2308 entries

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

  • Best score: 13
  • Best player score: 15
  • Position: #448 / 742
  • Number of attempts: 1
Search and Replace 0 - 4790 entries

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

  • Best score: 12
  • Best player score: 14
  • Position: #990 / 1585
  • Number of attempts: 4
Just the middle - 11346 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 7
  • Position: #756 / 4160
  • Number of attempts: 3
Vice versa - 7778 entries

Little role switching.

  • Best score: 12
  • Best player score: 16
  • Position: #1255 / 2095
  • Number of attempts: 2
Collect List - 4261 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 17
  • Position: #943 / 1185
  • Number of attempts: 1
I forgot quotes - 15922 entries

Oops.

  • Best score: 10
  • Best player score: 17
  • Position: #2862 / 4159
  • Number of attempts: 1
-a-b-c- - 3170 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 16
  • Position: #819 / 1127
  • Number of attempts: 1
quotes inside quotes - 3124 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: 17
  • Position: #888 / 1071
  • Number of attempts: 1
Words in parens - 12848 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 16
  • Position: #2330 / 3943
  • Number of attempts: 1
switch variable - 5028 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 11
  • Position: #444 / 1734
  • Number of attempts: 3
Generate English Alphabets - 463 entries

Start with a, get up to z.

  • Best score: 19
  • Best player score: 26
  • Position: #156 / 198
  • Number of attempts: 3
Numbering a List - 1855 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 21
  • Position: #404 / 638
  • Number of attempts: 1
A Simple One - 996 entries

Here is a very simple one - just to illustrate/introduce a vim feature that some people seem to miss...

  • Best score: 9
  • Best player score: 9
  • Position: #442 / 641
  • Number of attempts: 1
Reformat/Refactor a Golfer Class - 6512 entries

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

  • Best score: 32
  • Best player score: 38
  • Position: #618 / 1603
  • Number of attempts: 2
Jonathan Elliott
Twitter:

I like maths, crosswords and beer.

entered into 23 challenges

contributed 0 challenges