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

Simple, Practical, and Common - 33929 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: 22
  • Best player score: 22
  • Position: #1402 / 7489
  • Number of attempts: 4
Add semicolons - 10923 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 10
  • Position: #308 / 3087
  • Number of attempts: 5
Order and join - 992 entries

There's something special about the input order.

  • Best score: 10
  • Best player score: 12
  • Position: #168 / 261
  • Number of attempts: 2
VimGolfNight - 575 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Position: #145 / 352
  • Number of attempts: 2
Going underground.... - 357 entries

Simple reformatting: in this case changing from the format London underground supplies its customers with, to the format that Google Calendar likes...

  • Best score: 22
  • Best player score: 33
  • Position: #95 / 129
  • Number of attempts: 1
A HAPPY NEW YEAR 2014 ! - 10720 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 12
  • Position: #1699 / 3703
  • Number of attempts: 3
Counting in binary - 526 entries

"a" represents 0; "A" represents 1. Start from zero and count to 15.

  • Best score: 16
  • Best player score: 31
  • Position: #52 / 117
  • Number of attempts: 2
quotes inside quotes - 3185 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: #568 / 1086
  • Number of attempts: 1
Words in parens - 13005 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 16
  • Position: #2053 / 3979
  • Number of attempts: 2
Let's play some Ivmgolf - 1138 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 9
  • Position: #238 / 450
  • Number of attempts: 2
Vertical Limit - 2610 entries

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

  • Best score: 21
  • Best player score: 23
  • Position: #226 / 771
  • Number of attempts: 4
Append semicolon after expressions - 1061 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 12
  • Position: #208 / 421
  • Number of attempts: 1
switch variable - 5101 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 14
  • Position: #1343 / 1756
  • Number of attempts: 2
Make it more readable - 2015 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 17
  • Position: #459 / 654
  • Number of attempts: 1
Ruby 1.9 hashes - 1277 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: 12
  • Best player score: 15
  • Position: #275 / 413
  • Number of attempts: 1
Shebangs for all - 2062 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: 12
  • Position: #136 / 525
  • Number of attempts: 2
A Simple One - 1070 entries

Here is a very simple one - just to illustrate/introduce a vim feature that some people seem to miss...

  • Best score: 9
  • Best player score: 9
  • Position: #359 / 673
  • Number of attempts: 1
Simple text editing with Vim - 13419 entries

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

  • Best score: 13
  • Best player score: 15
  • Position: #2143 / 3846
  • Number of attempts: 1
Reformat/Refactor a Golfer Class - 7507 entries

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

  • Best score: 7
  • Best player score: 36
  • Position: #467 / 1847
  • Number of attempts: 3
Jérémy Autran
Twitter:

Software engineer at @OpenDataSoft

entered into 19 challenges

contributed 0 challenges