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

A simple change - 362 entries

Just change the numbers in the most efficient way ...

  • Best score: 12
  • Best player score: 43
  • Number of attempts: 2
Braces or Brackets? - 626 entries

Someone forgot whether to use braces or brackets and you have to clean up their code!

  • Best score: 34
  • Best player score: 41
  • Number of attempts: 2
Sort and add attributes - 1090 entries

Sort the states and add the attribute country to each record.

  • Best score: 33
  • Best player score: 33
  • Number of attempts: 6
Reverse Simple Deletion - 714 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 3
switch variable - 4342 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 8
Append semicolon after expressions - 869 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 3
Exchanging Quotes - 761 entries

Sometimes you need to exchange a choice of quotes in some code.

  • Best score: 30
  • Best player score: 36
  • Number of attempts: 5
Wrap the text of an email message to 79 characters - 492 entries

You're replying to an email with silly long lines. Clean them up.

  • Best score: 5
  • Best player score: 5
  • Number of attempts: 4
Let's play some Ivmgolf - 921 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 10
  • Number of attempts: 2
The Cake is a Lie - 1127 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 9
  • Number of attempts: 4
Simple text editing with Vim - 10535 entries

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

  • Best score: 13
  • Best player score: 13
  • Number of attempts: 18
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: 10
  • Number of attempts: 8
Delete unwanted lines - 336 entries

Delete all lines which does not end in "o.."

  • Best score: 9
  • Best player score: 9
  • Number of attempts: 2
A HAPPY NEW YEAR 2014 ! - 9599 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 6
Search and Replace 0 - 4166 entries

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

  • Best score: 12
  • Best player score: 13
  • Number of attempts: 2
Reverse characters in a line - 585 entries

You have everything you need, just not in the right order. Mastermind would give you 26 white pegs.

  • Best score: 12
  • Best player score: 18
  • Number of attempts: 1
Change the content of a string - 1238 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 22
  • Number of attempts: 7
A Simple One - 845 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
  • Number of attempts: 11
Words in parens - 11168 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 14
  • Number of attempts: 4
quotes inside quotes - 2804 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: 14
  • Number of attempts: 7
replacing each line of a block selection - 2542 entries

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

  • Best score: 18
  • Best player score: 24
  • Number of attempts: 6
Reformat/Refactor a Golfer Class - 5524 entries

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

  • Best score: 32
  • Best player score: 44
  • Number of attempts: 4
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
Case preserving word replacement - 389 entries

Half way through my project, my people turned into dogs. Now I have to change everything in my source.

  • Best score: 19
  • Best player score: 19
  • Number of attempts: 4
vim = 22 / 7 - 398 entries

pi square vim

  • Best score: 20
  • Best player score: 22
  • Number of attempts: 5
Simple, Practical, and Common - 25694 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: 7
Reformat some Python - 511 entries

Fix some very bizarrely laid-out code.

  • Best score: 34
  • Best player score: 61
  • Number of attempts: 1
Vertical Limit - 2126 entries

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

  • Best score: 21
  • Best player score: 26
  • Number of attempts: 7
Charlene Tshos
Twitter:

Human.

entered into 28 challenges

contributed 0 challenges