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 - 33677 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: #1039 / 7431
  • Number of attempts: 6
Search and Replace 0 - 5002 entries

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

  • Best score: 12
  • Best player score: 13
  • Position: #793 / 1629
  • Number of attempts: 6
Create Leading Zeros - 241 entries

Create leading zeros only for id columns. Please use generic approach!

  • Best score: 23
  • Best player score: 24
  • Position: #20 / 82
  • Number of attempts: 5
VimGolfNight - 560 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Position: #94 / 347
  • Number of attempts: 2
Split the words - 368 entries

Add the spaces manually if you must, but if you use Vim's spell checking feature wisely, I think you'll save a LARGE number of strokes.

  • Best score: 18
  • Best player score: 20
  • Position: #13 / 111
  • Number of attempts: 8
Permutations N=4 - 61 entries

Could use backtracking or other algorithm to generate sorted numbers. Second chance !

  • Best score: 25
  • Best player score: 53
  • Position: #17 / 19
  • Number of attempts: 4
A HAPPY NEW YEAR 2014 ! - 10676 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Position: #460 / 3687
  • Number of attempts: 5
attr_aligner - 3520 entries

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

  • Best score: 19
  • Best player score: 19
  • Position: #15 / 702
  • Number of attempts: 5
Number an outline - 280 entries

The indent and words are right, but the numbers are all wrong.

  • Best score: 25
  • Best player score: 30
  • Position: #12 / 78
  • Number of attempts: 4
Words in parens - 12951 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #137 / 3966
  • Number of attempts: 3
Pairs of numbers - 363 entries

Line 1 represents x, line 2 y-data. Bring the corresponding pairs in the form "[x,y]\n"

  • Best score: 26
  • Best player score: 27
  • Position: #23 / 136
  • Number of attempts: 5
Block Fun 1 - 210 entries

Manipulate the columns to produce desired result.

  • Best score: 14
  • Best player score: 19
  • Position: #28 / 75
  • Number of attempts: 3
Sort by your own sum - 86 entries

Same numbers as last time, but you'll have to add them yourself.

  • Best score: 24
  • Best player score: 32
  • Position: #13 / 30
  • Number of attempts: 2
abcd > a b c d - 294 entries

transform the single spaces into 4 spaces repeat for each line

  • Best score: 15
  • Best player score: 15
  • Position: #111 / 224
  • Number of attempts: 1
The Quick Brown Fox Jumps Over The Lazy Vim - 425 entries

Someone has vandalized this text file and replaced the beginning character of one word in each line with a Big "X." Please remove the big X's, and fix each line to read "The Quick Brown Fox Jumps Over The Lazy Dog."

  • Best score: 8
  • Best player score: 11
  • Position: #130 / 193
  • Number of attempts: 2
The name of the game - 668 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Position: #145 / 361
  • Number of attempts: 2
Saving the hashes(#) - 2063 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: 25
  • Position: #165 / 480
  • Number of attempts: 4
Let's play some Ivmgolf - 1122 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 9
  • Position: #214 / 446
  • Number of attempts: 2
Vertical Limit - 2540 entries

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

  • Best score: 21
  • Best player score: 22
  • Position: #141 / 755
  • Number of attempts: 5
replacing each line of a block selection - 3001 entries

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

  • Best score: 18
  • Best player score: 19
  • Position: #147 / 778
  • Number of attempts: 3
Switch function arguments - 2140 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 12
  • Position: #247 / 664
  • Number of attempts: 3
switch variable - 5079 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 12
  • Position: #770 / 1749
  • Number of attempts: 3
Make it more readable - 2009 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 14
  • Position: #157 / 652
  • Number of attempts: 5
remove dupes from array - 1358 entries

given a random string that contains a ruby-esque array, make sure that there are no duplicate elements

  • Best score: 17
  • Best player score: 17
  • Position: #52 / 336
  • Number of attempts: 11
Before there was Farmville... - 101 entries

There was old MacDonald. For my toddler. The first Vim sing-a-long?

  • Best score: 156
  • Best player score: 239
  • Position: #38 / 49
  • Number of attempts: 1
Numbering a List - 1935 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 18
  • Position: #131 / 654
  • Number of attempts: 5
Add fold markers to a .c file - 660 entries

Fold markers can make it easier to navigate source code. Add them to this .c file.

  • Best score: 30
  • Best player score: 31
  • Position: #54 / 189
  • Number of attempts: 5
Whitespace, empty lines and tabs - 3708 entries

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

  • Best score: 16
  • Best player score: 17
  • Position: #94 / 797
  • Number of attempts: 9
Simple text editing with Vim - 12897 entries

Make the pairs of lines match up by making each second line same as first

  • Best score: 13
  • Best player score: 14
  • Position: #1157 / 3717
  • Number of attempts: 4
Reformat/Refactor a Golfer Class - 7040 entries

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

  • Best score: 28
  • Best player score: 33
  • Position: #235 / 1729
  • Number of attempts: 8
thasso
Twitter:

entered into 30 challenges

contributed 0 challenges