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

V to the i - 4813 entries

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

  • Best score: 7
  • Best player score: 7
  • Position: #188 / 1897
  • Number of attempts: 5
Just the middle - 11477 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #1766 / 4206
  • Number of attempts: 4
Interweave two blocks of text - 661 entries

Suppose you've got data on a list of things from multiple sources. They're all in separate chunks, so how might you create a tabular output?

  • Best score: 15
  • Best player score: 19
  • Position: #166 / 215
  • Number of attempts: 2
Basic renumbering - 5675 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 23
  • Position: #996 / 1268
  • Number of attempts: 4
comments galore - 1045 entries

Basic comment reformatting

  • Best score: 10
  • Best player score: 10
  • Position: #85 / 424
  • Number of attempts: 2
Mirror Symmetry - 822 entries

Add backslashes.

  • Best score: 7
  • Best player score: 14
  • Position: #223 / 269
  • Number of attempts: 1
Logging with key - 328 entries

Sometimes it is better to log with meaningful key

  • Best score: 21
  • Best player score: 38
  • Position: #74 / 88
  • Number of attempts: 3
Space out the alphabet - 1657 entries

Put 3 spaces between adjacent letters.

  • Best score: 15
  • Best player score: 17
  • Position: #160 / 444
  • Number of attempts: 3
remove all lines in first part - 211 entries

From the second part, remove all lines in the first part. It can be useful when you have done something from a long list, you want to know what is not done yet!

  • Best score: 13
  • Best player score: 15
  • Position: #19 / 67
  • Number of attempts: 4
Fix the XML - 1039 entries

The challenge consists in having a valid xml from an incomplete source.

  • Best score: 18
  • Best player score: 35
  • Position: #267 / 290
  • Number of attempts: 2
Condensed Cases - 804 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: 17
  • Position: #198 / 247
  • Number of attempts: 1
I forgot quotes - 16014 entries

Oops.

  • Best score: 10
  • Best player score: 14
  • Position: #1540 / 4188
  • Number of attempts: 5
-a-b-c- - 3216 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 16
  • Position: #792 / 1138
  • Number of attempts: 1
Count both ways - 1022 entries

Right AND down.

  • Best score: 13
  • Best player score: 16
  • Position: #226 / 354
  • Number of attempts: 4
120 Degrees - 493 entries

Rotate that triangle.

  • Best score: 14
  • Best player score: 14
  • Position: #20 / 145
  • Number of attempts: 2
Where should I put the Newline? - 881 entries

Help me put the newline.

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

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Position: #686 / 3687
  • Number of attempts: 4
attr_aligner - 3522 entries

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

  • Best score: 19
  • Best player score: 30
  • Position: #375 / 703
  • Number of attempts: 3
Letter case trickery - 1630 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: 11
  • Position: #270 / 518
  • Number of attempts: 2
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: 14
  • Position: #193 / 1079
  • Number of attempts: 5
Groups magic - 161 entries

Regexp or macros for string converting: (a) -> ___ (abc) -> ____ (abcd) -> ______ All in the '(' replace to _ multiply by char count + ()

  • Best score: 13
  • Best player score: 14
  • Position: #61 / 94
  • Number of attempts: 3
Remove noise from HTTP log - 717 entries

This piece of log (from the year 2000) contains some irrelevant data. We only want to see the HTTP method and resource.

  • Best score: 15
  • Best player score: 19
  • Position: #242 / 273
  • Number of attempts: 1
Sort the cardinal numbers - 315 entries

Maybe a simple challenge.

  • Best score: 12
  • Best player score: 14
  • Position: #127 / 149
  • Number of attempts: 2
Shebangs for all - 2016 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: 14
  • Position: #232 / 518
  • Number of attempts: 3
Make Fancy Header - 1059 entries

Make the header text stand out with surrounding asterisks

  • Best score: 15
  • Best player score: 19
  • Position: #250 / 345
  • Number of attempts: 3
Whitespace, empty lines and tabs - 3734 entries

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

  • Best score: 16
  • Best player score: 23
  • Position: #362 / 801
  • Number of attempts: 4
Simple text editing with Vim - 12939 entries

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

  • Best score: 13
  • Best player score: 15
  • Position: #2109 / 3726
  • Number of attempts: 4
Benny Wong
Twitter:

building time machine as cofounder o' @timehop • fan of @lorwich • helped build @exitstrategynyc • adder of ascii art in git commits

entered into 27 challenges

contributed 0 challenges