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

344 active golfers, 1023 entries

Leaderboard (lowest score wins):
12
#1 - Glenn / @spamcow_moo

01/04/2011 at 07:17PM

12
#2 - Marc Lacoursière / @RooSoft

01/04/2011 at 11:02PM

12
#3 - aaaa3331 / @aaaa3331

01/05/2011 at 12:32AM

12
#4 - Wei Dai / @clvv42

01/05/2011 at 04:51AM

12
#5 - derp derp / @derp__

01/05/2011 at 07:48PM

12
#6 - Ujjwol Lamichhane / @Ujjwol

01/07/2011 at 10:21AM

12
#7 - Paul Tarjan / @ptarjan

01/08/2011 at 10:08AM

12
#8 - Clive Evans / @swish_bob

01/13/2011 at 09:36PM

12
#9 - Thomas Schönwälder / @Masei1988

01/15/2011 at 05:04PM

12
#10 - Jacob Maine / @jacobmaine

01/15/2011 at 08:58PM

12
#11 - ls lahrs / @lslah

01/17/2011 at 03:23PM

12
#12 - Rob Ciaccio / @RobertoCalavera

01/20/2011 at 09:18AM

12
#13 - Oleg Roshupkin / @jjjahson

01/20/2011 at 09:37AM

12
#14 - Michał Taszycki / @mehowte

01/24/2011 at 03:16PM

12
#15 - xhtmlforum / @xhtmlforum

01/24/2011 at 09:19PM

12
#16 - Federico Galassi / @federicogalassi

01/26/2011 at 05:41AM

12
#17 - Eivind Jahren / @HaskellElephant

02/02/2011 at 09:19PM

12
#18 - Joost / @vlabakje

02/12/2011 at 05:58PM

12
#19 - Pavlo Klets / @p01nt

02/25/2011 at 10:44AM

12
#20 - vg / @vimgolfer

02/27/2011 at 09:33PM

12
#21 - Dragan Cvetinovic / @kawkafi

05/08/2011 at 11:00AM

12
#22 - (Emile (Swarts)) / @EmileSwarts

06/07/2011 at 09:46PM

12
#23 - Stuart Gale / @bishboria

06/19/2011 at 12:34AM

12
#24 - not so punk :] / @notsopunk

06/19/2011 at 04:28PM

12
#25 - Johan Sveholm / @rymdtjuren

06/30/2011 at 08:21AM

12
#26 - Hu Junfeng / @junfeng

07/22/2011 at 02:56PM

12
#27 - Dave / @zzdave13

07/26/2011 at 06:36PM

12
#28 - Sergey Kim / @skim1776

08/10/2011 at 10:37AM

12
#29 - Trevor Powell / @DoomedBunnies

12/01/2011 at 06:35AM

12
#30 - You-Siang Lin / @yslinnctu

12/02/2011 at 11:55AM