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

Paste a column after a column - 2672 entries

This task is very common while using multi-cursor. What is the elegant vim way ?

  • Best score: 7
  • Best player score: 45
  • Position: #493 / 580
  • Number of attempts: 1
Reformat symbols in list - 1661 entries

Saw this in some lecture, easy reformatting using multiple cursor in VS Code

  • Best score: 24
  • Best player score: 49
  • Position: #320 / 358
  • Number of attempts: 1
delete swap - 1918 entries

delete all swap

  • Best score: 5
  • Best player score: 10
  • Position: #470 / 583
  • Number of attempts: 4
Simple, Practical, and Common - 34031 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: 31
  • Position: #5559 / 7520
  • Number of attempts: 1
V to the i - 4890 entries

Input is 99 V's. Output is 100 i's.

  • Best score: 7
  • Best player score: 8
  • Position: #1071 / 1917
  • Number of attempts: 1
Search and Replace 0 - 5170 entries

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

  • Best score: 7
  • Best player score: 13
  • Position: #862 / 1680
  • Number of attempts: 4
Just the middle - 11636 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 9
  • Position: #3427 / 4262
  • Number of attempts: 1
Python Hello World! Reformatting - 1057 entries

A novice Python using prints Hello World! and a pro shows him different way. Using vim to get into pro style from novice, win the challenge.

  • Best score: 39
  • Best player score: 44
  • Position: #246 / 402
  • Number of attempts: 1
camel riding - 817 entries

add a prefix on some camelCase variables

  • Best score: 15
  • Best player score: 17
  • Position: #191 / 285
  • Number of attempts: 3
Space out the alphabet - 1700 entries

Put 3 spaces between adjacent letters.

  • Best score: 15
  • Best player score: 27
  • Position: #418 / 460
  • Number of attempts: 1
Where should I put the Newline? - 916 entries

Help me put the newline.

  • Best score: 7
  • Best player score: 8
  • Position: #367 / 453
  • Number of attempts: 1
A HAPPY NEW YEAR 2014 ! - 10757 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 16
  • Position: #3321 / 3717
  • Number of attempts: 1
attr_aligner - 3569 entries

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

  • Best score: 7
  • Best player score: 24
  • Position: #243 / 712
  • Number of attempts: 1
quotes inside quotes - 3210 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: 7
  • Best player score: 17
  • Position: #880 / 1097
  • Number of attempts: 1
Switch function arguments - 2235 entries

How to switch two arguments of a function.

  • Best score: 7
  • Best player score: 15
  • Position: #589 / 687
  • Number of attempts: 1
Reformat/Refactor a Golfer Class - 7737 entries

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

  • Best score: 7
  • Best player score: 39
  • Position: #792 / 1901
  • Number of attempts: 4
John Clara
Twitter:

entered into 16 challenges

contributed 0 challenges