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

Make HTML List - 875 entries

Turn the comma separated list into an unordered html list.

  • Best score: 33
  • Best player score: 55
  • Number of attempts: 3
Presidential Sorting - 45 entries

Given a nice CSV formatted arrangement of the Presidents of the United States, we need to print out an alphabetical list in pretty columns. Prove that vim can conquer this basic Excel task!

  • Best score: 40
  • Best player score: 52
  • Number of attempts: 1
Simple, Practical, and Common - 24063 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: 2
  • Best player score: 26
  • Number of attempts: 5
Line 'em up! - 275 entries

It can be so hard to keep everything neatly lined-up. Somebody clearly hasn't bothered here. Tidy it up, please!

  • Best score: 17
  • Best player score: 26
  • Number of attempts: 1
multiple cursor alternative - 1034 entries

from: https://www.reddit.com/r/vim/comments/6w5pfa/crosspost_from_remacs_how_would_you_do_this_in_vim/

  • Best score: 19
  • Best player score: 22
  • Number of attempts: 1
One number per line - 12160 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 20
  • Number of attempts: 4
Mirror Symmetry - 694 entries

Add backslashes.

  • Best score: 7
  • Best player score: 13
  • Number of attempts: 1
Gray area - 625 entries

It's a golf metaphor or something.

  • Best score: 11
  • Best player score: 13
  • Number of attempts: 1
switch variable - 4251 entries

how fast can you switch two variable ?

  • Best score: 3
  • Best player score: 11
  • Number of attempts: 1
Just the middle - 8983 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 9
  • Number of attempts: 2
Condensed Cases - 675 entries

Apple's new programming language, Swift, allows two style of case statements: 1) one Enum case on each line, or 2) multiple Enum cases on a single line. Convert the following from the first case (no pun intended) to the second type.

  • Best score: 12
  • Best player score: 14
  • Number of attempts: 1
Words in parens - 10855 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 16
  • Number of attempts: 2
Letter case trickery - 1426 entries

This file is in a downright esoteric format, consisting of hexadecimal numbers, non-hexadecimal keywords, and "Z" indicating end-of-line. Make the hexadecimal numbers lowercase.

  • Best score: 9
  • Best player score: 12
  • Number of attempts: 1
Restore order to the alphabet - 153 entries

The numbers are OK. The letters are wonky.

  • Best score: 12
  • Best player score: 16
  • Number of attempts: 3
Extract argument from function - 1987 entries

The aim is to see if you can do some refactoring very fast.

  • Best score: 13
  • Best player score: 14
  • Number of attempts: 1
Don't know what this is - 1711 entries

Replace contents of brackets with matching number of spaces. Don't ask what the format's supposed to be.

  • Best score: 11
  • Best player score: 15
  • Number of attempts: 1
Vice versa - 5806 entries

Little role switching.

  • Best score: 2
  • Best player score: 13
  • Number of attempts: 3
camel riding - 680 entries

add a prefix on some camelCase variables

  • Best score: 15
  • Best player score: 17
  • Number of attempts: 2
That hyphen - 2125 entries

"vim vi improved"

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

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 14
  • Number of attempts: 1
Search and Replace 0 - 4021 entries

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

  • Best score: 12
  • Best player score: 14
  • Number of attempts: 2
-a-b-c- - 2531 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 16
  • Number of attempts: 1
Array transposition - 1515 entries

Transpose two arrays into one.

  • Best score: 16
  • Best player score: 22
  • Number of attempts: 1
I forgot quotes - 11387 entries

Oops.

  • Best score: 10
  • Best player score: 15
  • Number of attempts: 1
Add to end of each line... kinda - 263 entries

Visual-block mode can be used to add something to the end of each line, even if they are of differing lengths. However, what if it's not quite at the end?

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 2
Simple text editing with Vim - 10282 entries

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

  • Best score: 13
  • Best player score: 16
  • Number of attempts: 1
Rotating Philosophers Problem - 354 entries

Can you help the philosophers find a good place to sit before they get five forks and spaghetti?

  • Best score: 29
  • Best player score: 31
  • Number of attempts: 3
quotes inside quotes - 2726 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: 2
  • Best player score: 16
  • Number of attempts: 1
Reformat/Refactor a Golfer Class - 5464 entries

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

  • Best score: 32
  • Best player score: 39
  • Number of attempts: 2
Every other line - 2042 entries

AaAaAaA

  • Best score: 12
  • Best player score: 20
  • Number of attempts: 1
Stefan Knudsen
Twitter:

entered into 30 challenges

contributed 0 challenges