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

Before there was Farmville... - 91 entries

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

  • Best score: 156
  • Best player score: 239
  • Number of attempts: 1
Permutations N=4 - 55 entries

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

  • Best score: 25
  • Best player score: 53
  • Number of attempts: 4
Number an outline - 199 entries

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

  • Best score: 25
  • Best player score: 30
  • Number of attempts: 4
Add fold markers to a .c file - 441 entries

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

  • Best score: 30
  • Best player score: 31
  • Number of attempts: 5
Pairs of numbers - 325 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
  • Number of attempts: 5
Saving the hashes(#) - 1765 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
  • Number of attempts: 4
Make it more readable - 1756 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 14
  • Number of attempts: 5
VimGolfNight - 458 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 2
Reformat/Refactor a Golfer Class - 5513 entries

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

  • Best score: 32
  • Best player score: 33
  • Number of attempts: 8
Sort by your own sum - 42 entries

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

  • Best score: 25
  • Best player score: 32
  • Number of attempts: 2
abcd > a b c d - 241 entries

transform the single spaces into 4 spaces repeat for each line

  • Best score: 15
  • Best player score: 15
  • Number of attempts: 1
remove dupes from array - 1197 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
  • Number of attempts: 11
Simple text editing with Vim - 10466 entries

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

  • Best score: 13
  • Best player score: 14
  • Number of attempts: 4
switch variable - 4324 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 3
Let's play some Ivmgolf - 921 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 9
  • Number of attempts: 2
Switch function arguments - 1840 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 3
Search and Replace 0 - 4145 entries

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

  • Best score: 12
  • Best player score: 13
  • Number of attempts: 6
A HAPPY NEW YEAR 2014 ! - 9550 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 5
The Quick Brown Fox Jumps Over The Lazy Vim - 330 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: 10
  • Best player score: 11
  • Number of attempts: 2
The name of the game - 582 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 2
Words in parens - 11108 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 14
  • Number of attempts: 3
Split the words - 334 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
  • Number of attempts: 8
Whitespace, empty lines and tabs - 2554 entries

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

  • Best score: 16
  • Best player score: 17
  • Number of attempts: 9
Numbering a List - 1733 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 18
  • Number of attempts: 5
replacing each line of a block selection - 2529 entries

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

  • Best score: 18
  • Best player score: 19
  • Number of attempts: 3
Block Fun 1 - 158 entries

Manipulate the columns to produce desired result.

  • Best score: 14
  • Best player score: 19
  • Number of attempts: 3
attr_aligner - 3025 entries

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

  • Best score: 19
  • Best player score: 19
  • Number of attempts: 5
Vertical Limit - 2124 entries

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

  • Best score: 21
  • Best player score: 22
  • Number of attempts: 5
Simple, Practical, and Common - 25356 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
  • Number of attempts: 6
Create Leading Zeros - 192 entries

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

  • Best score: 23
  • Best player score: 24
  • Number of attempts: 5
thasso
Twitter:

entered into 30 challenges

contributed 0 challenges