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 - 33385 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: 26
  • Position: #3469 / 7364
  • Number of attempts: 5
Swap values - 4543 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 14
  • Position: #685 / 1257
  • Number of attempts: 2
One number per line - 18616 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 21
  • Position: #2333 / 3842
  • Number of attempts: 6
Split line with dots - 2125 entries

This line is too long, split it.

  • Best score: 15
  • Best player score: 18
  • Position: #287 / 630
  • Number of attempts: 5
Every other line - 2886 entries

AaAaAaA

  • Best score: 12
  • Best player score: 15
  • Position: #300 / 700
  • Number of attempts: 4
Search and Replace 0 - 4792 entries

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

  • Best score: 12
  • Best player score: 16
  • Position: #1180 / 1585
  • Number of attempts: 1
Just the middle - 11360 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #2269 / 4164
  • Number of attempts: 3
Wrap text in quotes - 349 entries

All the blocks of text should be wrapped in quotation marks.

  • Best score: 16
  • Best player score: 20
  • Position: #96 / 120
  • Number of attempts: 1
Vice versa - 7805 entries

Little role switching.

  • Best score: 12
  • Best player score: 13
  • Position: #742 / 2101
  • Number of attempts: 6
Paragraph breaks - 505 entries

Swap the blank lines and the aaa lines.

  • Best score: 10
  • Best player score: 13
  • Position: #115 / 165
  • Number of attempts: 3
comments galore - 998 entries

Basic comment reformatting

  • Best score: 10
  • Best player score: 11
  • Position: #348 / 418
  • Number of attempts: 2
Fix the XML - 996 entries

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

  • Best score: 18
  • Best player score: 28
  • Position: #220 / 284
  • Number of attempts: 2
50 factorials mod 97 - 47 entries

List 1! to 50!, but give your answer mod 97.

  • Best score: 28
  • Best player score: 36
  • Position: #16 / 18
  • Number of attempts: 1
I forgot quotes - 15931 entries

Oops.

  • Best score: 10
  • Best player score: 14
  • Position: #1660 / 4161
  • Number of attempts: 2
Count both ways - 1001 entries

Right AND down.

  • Best score: 13
  • Best player score: 19
  • Position: #332 / 351
  • Number of attempts: 1
120 Degrees - 468 entries

Rotate that triangle.

  • Best score: 14
  • Best player score: 28
  • Position: #126 / 143
  • Number of attempts: 1
Do you demand a shrubbery? - 1120 entries

Use :redir and crush the emacsgolfers.

  • Best score: 15
  • Best player score: 32
  • Position: #273 / 293
  • Number of attempts: 1
A HAPPY NEW YEAR 2014 ! - 10628 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 12
  • Position: #2126 / 3667
  • Number of attempts: 3
SFD-ROC: vimvimvim - 1581 entries

Oh no, this line is longer than 80 chars... put each 'vim' on a new line.

  • Best score: 8
  • Best player score: 8
  • Position: #81 / 439
  • Number of attempts: 4
Stairs Indenting - 448 entries

Indent each line with <line number> whitespaces.

  • Best score: 12
  • Best player score: 15
  • Position: #150 / 193
  • Number of attempts: 1
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: 29
  • Position: #341 / 473
  • Number of attempts: 2
Vertical Limit - 2448 entries

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

  • Best score: 21
  • Best player score: 27
  • Position: #537 / 738
  • Number of attempts: 1
switch variable - 5036 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 12
  • Position: #898 / 1736
  • Number of attempts: 1
Make it more readable - 1952 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 18
  • Position: #529 / 640
  • Number of attempts: 1
Daniel Bellenger
Twitter:

entered into 24 challenges

contributed 0 challenges