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):
14
#211 - James / @Dronak

09/26/2013 at 06:23PM

14
#212 - nona urbiz / @nospampleasemam

09/28/2013 at 10:27AM

14
#213 - Amiel Martin / @amielmartin

10/10/2013 at 06:23PM

14
#214 - Robert Rosolek / @robertrosolek

10/18/2013 at 02:10PM

14
#215 - US Dollar Price / @USDollarPrice

11/04/2013 at 08:35PM

14
#216 - Mike Marion / @mikejmarion

02/03/2014 at 11:35PM

14
#217 - Dave Derderian / @funayman

03/11/2014 at 09:42PM

14
#218 - Brian Olpin / @bolpin

03/29/2014 at 05:37AM

14
#219 - Yuval Netanel / @Yuval5555

05/07/2014 at 12:58PM

14
#220 - Austin Cormier / @lotusmorc

07/18/2014 at 03:42PM

14
#221 - Caek / @Caek_

08/14/2014 at 03:46AM

14
#222 - Jose Gutierrez / @Jogusa

09/22/2014 at 09:50AM

14
#223 - Elizabeth / @sprinkles418

03/31/2015 at 07:03PM

14
#224 - Walker Boh / @walker_boh

10/12/2015 at 12:35PM

14
#225 - Pete Sevander / @Sevanteri

11/13/2015 at 01:02PM

14
#226 - Ian Trophy / @prfrgg

01/30/2016 at 01:36PM

14
#227 - SilentFl / @Silent_Fl

02/10/2016 at 08:07PM

14
#228 - Cristian Lupașcu / @clupasq

02/19/2016 at 04:16PM

14
#229 - Chenut Ludovic / @7Brwa7

04/08/2016 at 08:14AM

14
#230 - Kyouma / @kyoumaJohn

10/14/2016 at 08:26PM

14
#231 - Bill Ruddock / @biinari

05/03/2017 at 10:39PM

14
#232 - Brandon Blakeley / @zkelvin

11/24/2017 at 07:36PM

14
#233 - Johannes Riecken / @rubystallion

01/15/2020 at 06:35PM

14
#234 - WbrL17 / @WbrL17

06/22/2022 at 09:11PM

15
#235 - Juan C. Muller / @juancmuller

12/31/2010 at 07:14PM

15
#236 - Joe Hassick / @jhassick

12/31/2010 at 07:36PM

15
#237 - Asís García / @asischao

12/31/2010 at 07:54PM

15
#238 - Joshua Flanagan / @jflanagan

01/01/2011 at 12:17AM

15
#239 - Balkoth / @_Balkoth_

01/01/2011 at 01:02AM

15
#240 - Tien Le / @tienlex

01/02/2011 at 06:01PM