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 - 33535 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: #257 / 7397
  • Number of attempts: 7
vim = 22 / 7 - 472 entries

pi square vim

  • Best score: 20
  • Best player score: 22
  • Position: #57 / 134
  • Number of attempts: 5
Add semicolons - 10841 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 11
  • Position: #1380 / 3058
  • Number of attempts: 6
Wrap the text of an email message to 79 characters - 750 entries

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

  • Best score: 5
  • Best player score: 5
  • Position: #175 / 405
  • Number of attempts: 4
Search and Replace 0 - 4952 entries

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

  • Best score: 12
  • Best player score: 13
  • Position: #786 / 1615
  • Number of attempts: 2
A HAPPY NEW YEAR 2014 ! - 10654 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Position: #355 / 3678
  • Number of attempts: 6
quotes inside quotes - 3154 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
  • Position: #75 / 1075
  • Number of attempts: 7
Words in parens - 12918 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #55 / 3957
  • Number of attempts: 4
Delete unwanted lines - 408 entries

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

  • Best score: 9
  • Best player score: 9
  • Position: #97 / 228
  • Number of attempts: 2
abcd > a b c d - 290 entries

transform the single spaces into 4 spaces repeat for each line

  • Best score: 15
  • Best player score: 15
  • Position: #83 / 221
  • Number of attempts: 1
A simple change - 461 entries

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

  • Best score: 12
  • Best player score: 43
  • Position: #188 / 191
  • Number of attempts: 2
The Quick Brown Fox Jumps Over The Lazy Vim - 416 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: 10
  • Position: #51 / 191
  • Number of attempts: 8
Let's play some Ivmgolf - 1118 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 10
  • Position: #349 / 445
  • Number of attempts: 2
Vertical Limit - 2522 entries

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

  • Best score: 21
  • Best player score: 26
  • Position: #423 / 751
  • Number of attempts: 7
Exchanging Quotes - 851 entries

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

  • Best score: 30
  • Best player score: 36
  • Position: #115 / 228
  • Number of attempts: 5
replacing each line of a block selection - 2987 entries

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

  • Best score: 18
  • Best player score: 24
  • Position: #507 / 774
  • Number of attempts: 6
Append semicolon after expressions - 1046 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 11
  • Position: #61 / 413
  • Number of attempts: 3
switch variable - 5061 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 11
  • Position: #181 / 1743
  • Number of attempts: 8
Case preserving word replacement - 454 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
  • Position: #54 / 180
  • Number of attempts: 4
A Simple One - 1037 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
  • Position: #313 / 657
  • Number of attempts: 11
Reverse Simple Deletion - 845 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 12
  • Position: #267 / 457
  • Number of attempts: 3
The Cake is a Lie - 1330 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 9
  • Position: #138 / 523
  • Number of attempts: 4
Reformat some Python - 604 entries

Fix some very bizarrely laid-out code.

  • Best score: 34
  • Best player score: 61
  • Position: #206 / 235
  • Number of attempts: 1
Reverse characters in a line - 750 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
  • Position: #188 / 261
  • Number of attempts: 1
Change the content of a string - 1541 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 22
  • Position: #103 / 577
  • Number of attempts: 7
Sort and add attributes - 1418 entries

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

  • Best score: 33
  • Best player score: 33
  • Position: #145 / 551
  • Number of attempts: 6
Braces or Brackets? - 957 entries

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

  • Best score: 34
  • Best player score: 41
  • Position: #104 / 306
  • Number of attempts: 2
Simple text editing with Vim - 12627 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #274 / 3653
  • Number of attempts: 18
Reformat/Refactor a Golfer Class - 6825 entries

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

  • Best score: 28
  • Best player score: 44
  • Position: #1080 / 1673
  • Number of attempts: 4
Charlene Tshos
Twitter:

Human.

entered into 29 challenges

contributed 0 challenges