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 - 33791 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 / 7455
  • Number of attempts: 4
Add semicolons - 10899 entries

Simply add a semicolon at the end of each line

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

There's something special about the input order.

  • Best score: 10
  • Best player score: 12
  • Position: #168 / 260
  • 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 ! - 10699 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 12
  • Position: #1694 / 3695
  • 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 - 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: 16
  • Position: #568 / 1085
  • Number of attempts: 1
Words in parens - 12975 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 16
  • Position: #2049 / 3971
  • Number of attempts: 2
Let's play some Ivmgolf - 1130 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 9
  • Position: #236 / 448
  • Number of attempts: 2
Vertical Limit - 2574 entries

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

  • Best score: 21
  • Best player score: 23
  • Position: #223 / 761
  • Number of attempts: 4
Append semicolon after expressions - 1057 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 12
  • Position: #207 / 420
  • Number of attempts: 1
switch variable - 5085 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 14
  • Position: #1338 / 1750
  • 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: 17
  • Position: #457 / 652
  • Number of attempts: 1
Ruby 1.9 hashes - 1260 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: #273 / 410
  • Number of attempts: 1
Shebangs for all - 2049 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: #134 / 523
  • Number of attempts: 2
A Simple One - 1064 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 / 670
  • Number of attempts: 1
Simple text editing with Vim - 13134 entries

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

  • Best score: 13
  • Best player score: 15
  • Position: #2104 / 3776
  • Number of attempts: 1
Reformat/Refactor a Golfer Class - 7258 entries

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

  • Best score: 10
  • Best player score: 36
  • Position: #456 / 1790
  • Number of attempts: 3
Jérémy Autran
Twitter:

Software engineer at @OpenDataSoft

entered into 19 challenges

contributed 0 challenges