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 4d1e29fda93ce03311000066

Ruby 1.9 hashes

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!

Start file
{
 
:a => 1,
 
:b => 2,
 
:c => 3
}
End file
{
  a
: 1,
  b
: 2,
  c
: 3
}

View Diff

2,4c2,4
<   :a => 1,
<   :b => 2,
<   :c => 3
---
>   a: 1,
>   b: 2,
>   c: 3

Solutions

The best way to learn is to practice. Below, you will find some of the solutions other golfers have entered. To unlock higher ranked solutions, submit your own entry which does as well or better than the solutions you can currently see - climb the ladder!

Check out these helpful resources to improve your Vim skills... Game on.

Unlock 406 remaining solutions by signing in and submitting your own entry
#407 Ed Gibbs / @edward_gibbs - Score: 39 - 10/05/11 @ 15:59
:%s/\s=>//g<CR>x<Up>x<Up>x<Right>:<BS>i:<Down><Left>i:<BS><BS>:<Down><Left>:<Esc>:w<CR>:q<CR>

0 comments


Created by: @jamesconroyfinn

407 active golfers, 1249 entries

Leaderboard (lowest score wins):
13
#121 -  Ikhsan Maulana / @ixandidu

12/31/2010 at 09:14PM

13
#122 - Ricardo Mendes / @locks

12/31/2010 at 09:42PM

13
#123 - Dmytro Shteflyuk / @kpumuk

12/31/2010 at 09:45PM

13
#124 - Israel Chauca F. / @Raimondi

12/31/2010 at 11:00PM

13
#125 - Tim Chase / @gumnos

01/01/2011 at 01:11AM

13
#126 - xer0x / @xer0x

01/01/2011 at 01:18AM

13
#127 - Brandon Ferguson / @bnferguson

01/01/2011 at 01:51AM

13
#128 - Matthew Draper / @_matthewd

01/01/2011 at 02:45AM

13
#129 - Thedward the Edward / @thedward

01/01/2011 at 07:46AM

13
#130 - Jim Garvin / @coderifous

01/01/2011 at 03:53PM

13
#131 - Renaud Morvan / @neleanth

01/01/2011 at 10:53PM

13
#132 - Addisu Taddese / @azeey

01/02/2011 at 12:28AM

13
#133 - Fer Enaf / @0x00C0FFEE

01/02/2011 at 12:55AM

13
#134 - Brad / @bjjwillis

01/02/2011 at 01:54AM

13
#135 - William Shackleton / @wshackleton

01/02/2011 at 03:24PM

13
#136 - Leonard Chin / @lchin

01/02/2011 at 04:16PM

13
#137 - dominique pellé / @vimgolfisto

01/02/2011 at 09:17PM

13
#138 - Adam Pohorecki / @apohorecki

01/03/2011 at 12:58PM

13
#139 - Corey Purcell / @coreypurcell

01/03/2011 at 01:49PM

13
#140 - Clément Nodet / @clementnodet

01/03/2011 at 03:36PM

13
#141 - Brian Ferrell / @endenizen

01/07/2011 at 01:02AM

13
#142 - h_east (トロッコ6個) / @h_east

01/19/2011 at 02:27PM

13
#143 - Andrey A. Ugolnik / @andreyugolnik

01/20/2011 at 02:30AM

13
#144 - Tom Duijf / @tomduijf

02/12/2011 at 05:58PM

13
#145 - Yannis Chatzimichos / @feedward

06/04/2011 at 02:48AM

13
#146 - Øystein Walle / @oysteinwalle

07/06/2011 at 12:49AM

13
#147 - Justin Love / @wondible

07/16/2011 at 12:47PM

13
#148 - Jesús Espino / @jespinog

09/07/2011 at 12:34AM

13
#149 - Sanchez Benjamin / @Sanchezsky

11/13/2011 at 02:07PM

13
#150 - Arton0306 / @Arton0306

12/18/2011 at 04:49PM