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):
17
#301 - jasper110 / @jasper110

09/22/2011 at 08:59AM

17
#302 - Burkhard Zimmermann / @BurkZimm

02/04/2012 at 10:52PM

17
#303 - Cody Veal / @cjhveal

02/05/2012 at 07:30PM

17
#304 - Javier Blanco / @jbgutierrez

02/09/2012 at 10:42PM

17
#305 - Arto Vuori / @dhpe

09/01/2012 at 06:14PM

17
#306 - Michael / @patheticpat

12/17/2012 at 09:31PM

17
#307 - Alex Castaño / @alexcasdel

07/11/2013 at 08:12PM

17
#308 - Peter Lustig / @LustigPeter42

07/29/2013 at 10:00PM

17
#309 - Oliver Christ / @0liverChrist

09/25/2013 at 10:01PM

17
#310 - Caleb Perkins / @tollbooth

01/29/2014 at 09:38AM

17
#311 - Tj / @yrddy

08/19/2014 at 06:31AM

17
#312 - Kiet Nguyen / @kietnguyen86

03/08/2015 at 08:14AM

17
#313 - Shunichi Kanade / @shunkana

12/15/2018 at 01:22PM

18
#314 - Isac Sacchi e Souza / @isacssouza

12/31/2010 at 10:43PM

18
#315 - Simon Jefford / @simonj

01/01/2011 at 11:25AM

18
#316 - okay zed / @okayzed

01/03/2011 at 03:59PM

18
#317 - Vladimir Parfinenko / @cypok

01/19/2011 at 05:07AM

18
#318 - Jon Allured / @jonallured

09/14/2011 at 01:50AM

18
#319 - Benjamin Sullivan / @benjaminsull

12/06/2011 at 03:26PM

18
#320 - Daniel Harrington / @rubiii

12/10/2011 at 08:26PM

18
#321 - vansan / @VinceVansan

08/21/2012 at 09:12PM

18
#322 - Tyler J. Kuhn / @blackwatertepes

08/27/2012 at 04:44PM

18
#323 - Domon / @Domon

09/11/2012 at 09:52AM

18
#324 - Vim London / @VimLondon

11/27/2012 at 09:20PM

18
#325 - Woojung Kim 김우중 / @_kimwz

07/15/2013 at 05:16AM

18
#326 - Fontaine Kévin / @DotSlash974

11/16/2013 at 06:57PM

18
#327 - Almog / @almog

05/07/2014 at 12:54PM

18
#328 - Kristijan Husak / @kristijan_husak

02/03/2015 at 08:39AM

18
#329 - Zuzana Dostalova / @Jocinka

03/14/2015 at 03:09PM

18
#330 - William Ott / @oddalot

04/11/2015 at 02:29PM