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

Simple, Practical, and Common - 33969 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: 24
  • Position: #2845 / 7502
  • Number of attempts: 5
Swap values - 4701 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 14
  • Position: #664 / 1290
  • Number of attempts: 5
One number per line - 18889 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 20
  • Position: #2182 / 3898
  • Number of attempts: 3
V to the i - 4860 entries

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

  • Best score: 7
  • Best player score: 8
  • Position: #1061 / 1910
  • Number of attempts: 3
Search and Replace 0 - 5104 entries

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

  • Best score: 12
  • Best player score: 14
  • Position: #1017 / 1664
  • Number of attempts: 3
That hyphen - 2624 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 9
  • Position: #74 / 708
  • Number of attempts: 5
Just the middle - 11582 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 9
  • Position: #3572 / 4243
  • Number of attempts: 5
Make HTML List - 1071 entries

Turn the comma separated list into an unordered html list.

  • Best score: 33
  • Best player score: 50
  • Position: #201 / 275
  • Number of attempts: 2
Basic renumbering - 5731 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 21
  • Position: #890 / 1277
  • Number of attempts: 1
Vice versa - 8011 entries

Little role switching.

  • Best score: 12
  • Best player score: 14
  • Position: #866 / 2153
  • Number of attempts: 2
Mirror Symmetry - 830 entries

Add backslashes.

  • Best score: 7
  • Best player score: 13
  • Position: #192 / 270
  • Number of attempts: 3
Entries sort - 101 entries

It cames to my mind a weird idea : sorting parts of my .vimrc. Take few minutes to sort out this, it's easy !

  • Best score: 14
  • Best player score: 18
  • Position: #35 / 42
  • Number of attempts: 2
Collect List - 4332 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 18
  • Position: #1027 / 1196
  • Number of attempts: 4
readability - 331 entries

Make the code readable by adding some spaces

  • Best score: 18
  • Best player score: 19
  • Position: #120 / 153
  • Number of attempts: 2
Interleave lines - 208 entries

This is some kind of « paste -d'\n' c b a ». There are many ways to achieve this.. just find the shortest!

  • Best score: 17
  • Best player score: 38
  • Position: #53 / 61
  • Number of attempts: 2
Space out the alphabet - 1690 entries

Put 3 spaces between adjacent letters.

  • Best score: 15
  • Best player score: 20
  • Position: #268 / 454
  • Number of attempts: 1
Fix the XML - 1050 entries

The challenge consists in having a valid xml from an incomplete source.

  • Best score: 18
  • Best player score: 28
  • Position: #223 / 291
  • Number of attempts: 1
Line 'em up! - 426 entries

It can be so hard to keep everything neatly lined-up. Somebody clearly hasn't bothered here. Tidy it up, please!

  • Best score: 17
  • Best player score: 28
  • Position: #90 / 115
  • Number of attempts: 2
I forgot quotes - 16178 entries

Oops.

  • Best score: 10
  • Best player score: 14
  • Position: #1618 / 4217
  • Number of attempts: 4
-a-b-c- - 3233 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 13
  • Position: #110 / 1143
  • Number of attempts: 5
Lisp Condense - 472 entries

Reduce 4 cons selection operations down to one function call.

  • Best score: 13
  • Best player score: 17
  • Position: #134 / 159
  • Number of attempts: 1
Gray area - 754 entries

It's a golf metaphor or something.

  • Best score: 11
  • Best player score: 14
  • Position: #221 / 273
  • Number of attempts: 2
Going underground.... - 376 entries

Simple reformatting: in this case changing from the format London underground supplies its customers with, to the format that Google Calendar likes...

  • Best score: 22
  • Best player score: 45
  • Position: #119 / 130
  • Number of attempts: 1
Letter case trickery - 1663 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: 11
  • Position: #275 / 522
  • Number of attempts: 2
Words in parens - 13029 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 20
  • Position: #3258 / 3985
  • Number of attempts: 1
Switch function arguments - 2197 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 14
  • Position: #499 / 679
  • Number of attempts: 1
switch variable - 5110 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 13
  • Position: #1181 / 1758
  • Number of attempts: 1
Make it more readable - 2028 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 18
  • Position: #537 / 656
  • Number of attempts: 2
Numbering a List - 1942 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 20
  • Position: #344 / 658
  • Number of attempts: 2
Endre Galaczi
Twitter:

entered into 29 challenges

contributed 0 challenges