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

attr_aligner - 3244 entries

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

  • Best score: 19
  • Best player score: 29
  • Number of attempts: 3
Alphabetize the directory - 260 entries

Put the contacts and their information in alphabetical order.

  • Best score: 30
  • Best player score: 43
  • Number of attempts: 1
Reformat some Python - 519 entries

Fix some very bizarrely laid-out code.

  • Best score: 34
  • Best player score: 47
  • Number of attempts: 1
Reverse and double space - 423 entries

Reverse the order of the given lines and double space everything

  • Best score: 14
  • Best player score: 17
  • Number of attempts: 1
Delete unwanted lines - 348 entries

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

  • Best score: 9
  • Best player score: 9
  • Number of attempts: 1
The meaning - 509 entries

Numbers are fun!

  • Best score: 5
  • Best player score: 5
  • Number of attempts: 1
Words in parens - 12079 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 16
  • Number of attempts: 3
NATO phonetic alphabet - 413 entries

Transform the series of words into a list.

  • Best score: 19
  • Best player score: 25
  • Number of attempts: 1
switch variable - 4663 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 13
  • Number of attempts: 1
Prefixes and suffixes - 526 entries

Generate all prefixes of "vimchallenge", then all suffixes.

  • Best score: 17
  • Best player score: 29
  • Number of attempts: 2
VimGolfNight - 471 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 3
Reverse characters in a line - 602 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: 15
  • Number of attempts: 2
Numbering a List - 1764 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 26
  • Number of attempts: 1
Shebangs for all - 1669 entries

We've all seen or used a shebang once or twice. Ditch the specific paths and leave just a dynamic Ruby and Python bath behind.

  • Best score: 11
  • Best player score: 24
  • Number of attempts: 1
Switch function arguments - 1888 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 14
  • Number of attempts: 3
Append semicolon after expressions - 898 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 4
Word frequency alignment - 215 entries

You've got to align the second column, but the spacing is inconvenient and there are nasty tabs in the way. If you're a "real Vim ninja," this could be very quick indeed...

  • Best score: 5
  • Best player score: 5
  • Number of attempts: 1
Reverse Simple Deletion - 736 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 1
Let's play some Ivmgolf - 975 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 9
  • Number of attempts: 1
Saving the hashes(#) - 1876 entries

The following file is copied from vimcasts.org(Its only for learning purpose,hope the site owner doesn't mind it), its probably the easiest of challenges.Our goal is to delete every line which doesn't contain a hash signs. The remaining hash signs with numbers are then sorted to get the final output.

  • Best score: 20
  • Best player score: 27
  • Number of attempts: 6
Stairs Indenting - 384 entries

Indent each line with <line number> whitespaces.

  • Best score: 12
  • Best player score: 14
  • Number of attempts: 1
Readable Rubyhash - 232 entries

Rubyists talk about being cutting edge but how many are using 1.9 in production? Time to convert those verbose 1.8 hashes in to symbolic, succinct 1.9 beauties!

  • Best score: 23
  • Best player score: 29
  • Number of attempts: 2
Vertical Limit - 2243 entries

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

  • Best score: 21
  • Best player score: 24
  • Number of attempts: 3
replacing each line of a block selection - 2694 entries

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

  • Best score: 18
  • Best player score: 32
  • Number of attempts: 4
quotes inside quotes - 2946 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
  • Number of attempts: 3
Make it more readable - 1812 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 16
  • Number of attempts: 1
A HAPPY NEW YEAR 2014 ! - 10149 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 1
Sam Burk
Twitter:

Christian, programmer, juggler, and pen addict.

entered into 27 challenges

contributed 0 challenges