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

Search and Replace 0 - 4790 entries

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

  • Best score: 12
  • Best player score: 13
  • Position: #775 / 1585
  • Number of attempts: 3
VimGolfNight - 531 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Position: #153 / 342
  • Number of attempts: 2
A HAPPY NEW YEAR 2014 ! - 10616 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 16
  • Position: #3211 / 3663
  • Number of attempts: 2
attr_aligner - 3444 entries

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

  • Best score: 19
  • Best player score: 32
  • Position: #466 / 692
  • Number of attempts: 1
Letter case trickery - 1594 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
  • Position: #317 / 511
  • Number of attempts: 3
quotes inside quotes - 3124 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: 16
  • Position: #569 / 1071
  • Number of attempts: 2
Words in parens - 12848 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 20
  • Position: #3189 / 3943
  • Number of attempts: 1
Pairs of numbers - 349 entries

Line 1 represents x, line 2 y-data. Bring the corresponding pairs in the form "[x,y]\n"

  • Best score: 26
  • Best player score: 63
  • Position: #125 / 132
  • Number of attempts: 1
Hole-in-one - 1012 entries

Lets take this golf thing literally.. Drive off the tee into the hole, and of course you don't strike the ball completely clean.

  • Best score: 15
  • Best player score: 23
  • Position: #262 / 302
  • Number of attempts: 1
Prefixes and suffixes - 591 entries

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

  • Best score: 17
  • Best player score: 29
  • Position: #138 / 192
  • Number of attempts: 2
SFD-ROC: vimvimvim - 1569 entries

Oh no, this line is longer than 80 chars... put each 'vim' on a new line.

  • Best score: 8
  • Best player score: 14
  • Position: #350 / 437
  • Number of attempts: 1
Vertical Limit - 2436 entries

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

  • Best score: 21
  • Best player score: 28
  • Position: #564 / 735
  • Number of attempts: 1
Switch function arguments - 2064 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 13
  • Position: #380 / 647
  • Number of attempts: 1
Reverse and double space - 489 entries

Reverse the order of the given lines and double space everything

  • Best score: 14
  • Best player score: 17
  • Position: #146 / 194
  • Number of attempts: 2
switch variable - 5028 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 12
  • Position: #797 / 1734
  • Number of attempts: 1
Change the content of a string - 1457 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 26
  • Position: #385 / 552
  • Number of attempts: 1
Whitespace, empty lines and tabs - 3290 entries

Convert tabs to spaces, strip empty lines and trailing whitespace.

  • Best score: 16
  • Best player score: 27
  • Position: #421 / 729
  • Number of attempts: 1
Reformat/Refactor a Golfer Class - 6512 entries

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

  • Best score: 32
  • Best player score: 40
  • Position: #782 / 1603
  • Number of attempts: 1

Contributed Challenges

Mess in revision history - 1157 entries

Help Joe clean up what Steve has cobbled.

barnabaguy
Twitter:

entered into 18 challenges

contributed 1 challenges