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 381 remaining solutions by signing in and submitting your own entry
#382 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

382 active golfers, 1157 entries

Leaderboard (lowest score wins):
13
#121 - Addisu Taddese / @azeey

01/02/2011 at 12:28AM

13
#122 - Fer Enaf / @0x00C0FFEE

01/02/2011 at 12:55AM

13
#123 - Brad / @bjjwillis

01/02/2011 at 01:54AM

13
#124 - William Shackleton / @wshackleton

01/02/2011 at 03:24PM

13
#125 - Leonard Chin / @lchin

01/02/2011 at 04:16PM

13
#126 - dominique pellé / @vimgolfisto

01/02/2011 at 09:17PM

13
#127 - Adam Pohorecki / @apohorecki

01/03/2011 at 12:58PM

13
#128 - Corey Purcell / @coreypurcell

01/03/2011 at 01:49PM

13
#129 - Clément Nodet / @clementnodet

01/03/2011 at 03:36PM

13
#130 - Brian Ferrell / @endenizen

01/07/2011 at 01:02AM

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

01/19/2011 at 02:27PM

13
#132 - Andrey A. Ugolnik / @andreyugolnik

01/20/2011 at 02:30AM

13
#133 - Tom Duijf / @tomduijf

02/12/2011 at 05:58PM

13
#134 - Yannis Chatzimichos / @feedward

06/04/2011 at 02:48AM

13
#135 - Øystein Walle / @oysteinwalle

07/06/2011 at 12:49AM

13
#136 - Justin Love / @wondible

07/16/2011 at 12:47PM

13
#137 - Jesús Espino / @jespinog

09/07/2011 at 12:34AM

13
#138 - Sanchez Benjamin / @Sanchezsky

11/13/2011 at 02:07PM

13
#139 - Arton0306 / @Arton0306

12/18/2011 at 04:49PM

13
#140 - 無ん垢の叫び / @john_ababa

02/24/2012 at 06:23AM

13
#141 - Jomo / @yoyoyojomo

03/14/2012 at 06:26PM

13
#142 - Attila M / @macat

07/02/2012 at 05:25PM

13
#143 - Michael Limiero / @michaellimiero

08/15/2012 at 04:20PM

13
#144 - Marcin Szamotulski / @me_coot

11/22/2012 at 11:16PM

13
#145 - gary.klindt@googlema / @garstekli

12/01/2013 at 09:21PM

13
#146 - Stefan Schmidt / @stafue

12/06/2013 at 03:05PM

13
#147 - pikaren / @REALpikaren

01/06/2014 at 02:45PM

13
#148 - Quota / @Quotad

02/03/2014 at 08:02AM

13
#149 - Brandon / @bjpowel2

03/11/2014 at 09:53PM

13
#150 - RB / @powerage88

03/23/2014 at 01:58AM