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 - 2557 entries

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

  • Best score: 14
  • Best player score: 45
  • Position: #473 / 558
  • Number of attempts: 1
Reformat symbols in list - 1625 entries

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

  • Best score: 24
  • Best player score: 49
  • Position: #314 / 349
  • Number of attempts: 1
delete swap - 1788 entries

delete all swap

  • Best score: 5
  • Best player score: 10
  • Position: #447 / 557
  • Number of attempts: 4
Simple, Practical, and Common - 33742 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: #5520 / 7447
  • Number of attempts: 1
V to the i - 4818 entries

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

  • Best score: 7
  • Best player score: 8
  • Position: #1062 / 1898
  • Number of attempts: 1
Search and Replace 0 - 5007 entries

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

  • Best score: 12
  • Best player score: 13
  • Position: #838 / 1631
  • Number of attempts: 4
Just the middle - 11495 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 9
  • Position: #3396 / 4213
  • Number of attempts: 1
Python Hello World! Reformatting - 1006 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: #238 / 383
  • Number of attempts: 1
camel riding - 793 entries

add a prefix on some camelCase variables

  • Best score: 15
  • Best player score: 17
  • Position: #187 / 281
  • Number of attempts: 3
Space out the alphabet - 1659 entries

Put 3 spaces between adjacent letters.

  • Best score: 15
  • Best player score: 27
  • Position: #406 / 446
  • Number of attempts: 1
Where should I put the Newline? - 881 entries

Help me put the newline.

  • Best score: 7
  • Best player score: 8
  • Position: #362 / 437
  • Number of attempts: 1
A HAPPY NEW YEAR 2014 ! - 10688 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 16
  • Position: #3299 / 3691
  • Number of attempts: 1
attr_aligner - 3522 entries

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

  • Best score: 19
  • Best player score: 24
  • Position: #237 / 703
  • Number of attempts: 1
quotes inside quotes - 3165 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: 17
  • Position: #870 / 1079
  • Number of attempts: 1
Switch function arguments - 2147 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 15
  • Position: #571 / 666
  • Number of attempts: 1
Reformat/Refactor a Golfer Class - 7173 entries

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

  • Best score: 28
  • Best player score: 39
  • Position: #743 / 1761
  • Number of attempts: 4
John Clara
Twitter:

entered into 16 challenges

contributed 0 challenges