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

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

  • Best score: 12
  • Best player score: 12
  • Position: #268 / 1631
  • Number of attempts: 5
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: #234 / 383
  • Number of attempts: 5
Create Leading Zeros - 245 entries

Create leading zeros only for id columns. Please use generic approach!

  • Best score: 23
  • Best player score: 50
  • Position: #72 / 84
  • Number of attempts: 1
A HAPPY NEW YEAR 2014 ! - 10699 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 12
  • Position: #1640 / 3695
  • Number of attempts: 2
quotes inside quotes - 3182 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: #769 / 1085
  • Number of attempts: 1
Words in parens - 12969 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 21
  • Position: #3373 / 3970
  • Number of attempts: 2
Draw the Go board - 149 entries

which is a 19×19 lines board. Here we use ascii characters only for simplicity. See diff file to get a sense. (See also http://en.wikipedia.org/wiki/Go_(game))

  • Best score: 50
  • Best player score: 82
  • Position: #46 / 51
  • Number of attempts: 1
Delete unwanted lines - 431 entries

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

  • Best score: 9
  • Best player score: 9
  • Position: #104 / 234
  • Number of attempts: 3
Groups magic - 162 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: #49 / 95
  • Number of attempts: 2
Readable Rubyhash - 274 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: 31
  • Position: #76 / 97
  • Number of attempts: 2
NATO phonetic alphabet - 538 entries

Transform the series of words into a list.

  • Best score: 19
  • Best player score: 21
  • Position: #89 / 197
  • Number of attempts: 1
A simple change - 474 entries

Just change the numbers in the most efficient way ...

  • Best score: 12
  • Best player score: 14
  • Position: #99 / 195
  • Number of attempts: 3
SFD-ROC: vimvimvim - 1616 entries

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

  • Best score: 8
  • Best player score: 11
  • Position: #275 / 447
  • Number of attempts: 3
Let's play some Ivmgolf - 1130 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 9
  • Position: #229 / 448
  • Number of attempts: 2
replacing each line of a block selection - 3005 entries

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

  • Best score: 18
  • Best player score: 31
  • Position: #677 / 779
  • Number of attempts: 2
Switch function arguments - 2152 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 19
  • Position: #640 / 667
  • Number of attempts: 1
Reverse and double space - 500 entries

Reverse the order of the given lines and double space everything

  • Best score: 14
  • Best player score: 16
  • Position: #102 / 199
  • Number of attempts: 2
Make it more readable - 2009 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 18
  • Position: #520 / 652
  • Number of attempts: 2
Numbering a List - 1939 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 21
  • Position: #396 / 655
  • Number of attempts: 2
Shebangs for all - 2046 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: 21
  • Position: #438 / 522
  • Number of attempts: 2
The Cake is a Lie - 1374 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 10
  • Position: #355 / 534
  • Number of attempts: 2
Compile C - 441 entries

You might have to get clever to do this one.

  • Best score: 19
  • Best player score: 22
  • Position: #93 / 143
  • Number of attempts: 1
Context Insensitive completion 1 - 512 entries

Finish writing this simple Python HTTP server.

  • Best score: 18
  • Best player score: 18
  • Position: #110 / 248
  • Number of attempts: 3
Remember FizzBuzz? - 742 entries

Output FizzBuzz to 100. Start with nothing.

  • Best score: 39
  • Best player score: 59
  • Position: #109 / 194
  • Number of attempts: 2
Change the content of a string - 1646 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 23
  • Position: #294 / 607
  • Number of attempts: 6
Sort and add attributes - 1499 entries

Sort the states and add the attribute country to each record.

  • Best score: 33
  • Best player score: 34
  • Position: #360 / 581
  • Number of attempts: 3
Reconstruct the Sentence - 1647 entries

Get the sentence back in the proper order, remove duplicate lines, and then combine the separate lines into one.

  • Best score: 19
  • Best player score: 25
  • Position: #350 / 433
  • Number of attempts: 4
Simple text editing with Vim - 13092 entries

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

  • Best score: 13
  • Best player score: 15
  • Position: #2089 / 3765
  • Number of attempts: 5
Reformat/Refactor a Golfer Class - 7229 entries

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

  • Best score: 10
  • Best player score: 37
  • Position: #544 / 1778
  • Number of attempts: 1
Zach Kemp
Twitter:

entered into 29 challenges

contributed 0 challenges