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 - 32953 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 / 7275
  • Number of attempts: 4
Add semicolons - 10545 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 10
  • Position: #309 / 2989
  • Number of attempts: 5
Order and join - 881 entries

There's something special about the input order.

  • Best score: 10
  • Best player score: 12
  • Position: #153 / 242
  • Number of attempts: 2
VimGolfNight - 497 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Position: #145 / 328
  • Number of attempts: 2
Going underground.... - 315 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: #89 / 122
  • Number of attempts: 1
A HAPPY NEW YEAR 2014 ! - 10538 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 12
  • Position: #1660 / 3638
  • Number of attempts: 3
Counting in binary - 412 entries

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

  • Best score: 16
  • Best player score: 31
  • Position: #48 / 108
  • Number of attempts: 2
quotes inside quotes - 3030 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: #543 / 1045
  • Number of attempts: 1
Words in parens - 12736 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 16
  • Position: #2013 / 3919
  • Number of attempts: 2
Let's play some Ivmgolf - 1015 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 9
  • Position: #221 / 420
  • Number of attempts: 2
Vertical Limit - 2369 entries

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

  • Best score: 21
  • Best player score: 23
  • Position: #210 / 717
  • Number of attempts: 4
Append semicolon after expressions - 953 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 12
  • Position: #194 / 387
  • Number of attempts: 1
switch variable - 4937 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 14
  • Position: #1310 / 1707
  • Number of attempts: 2
Make it more readable - 1897 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 17
  • Position: #438 / 624
  • Number of attempts: 1
Ruby 1.9 hashes - 1172 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: #260 / 386
  • Number of attempts: 1
Shebangs for all - 1777 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: #122 / 468
  • Number of attempts: 2
A Simple One - 934 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 / 617
  • Number of attempts: 1
Simple text editing with Vim - 11656 entries

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

  • Best score: 13
  • Best player score: 15
  • Position: #1906 / 3418
  • Number of attempts: 1
Reformat/Refactor a Golfer Class - 6033 entries

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

  • Best score: 32
  • Best player score: 36
  • Position: #420 / 1486
  • Number of attempts: 3
Jérémy Autran
Twitter:

Software engineer at @OpenDataSoft

entered into 19 challenges

contributed 0 challenges