Real Vim ninjas count every keystroke - do you?

Pick a challenge, fire up Vim, and show us what you got.

Leaderboard, Changelog, Rules & FAQ, updates: @vimgolf, RSS.

Your VimGolf key: please sign in

$ gem install vimgolf
$ vimgolf setup
$ vimgolf put 50b5266f448d770002000106

Readable Rubyhash

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

1c1,5
< {: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 56 remaining solutions by signing in and submitting your own entry
#57 Rolinh / @Rolinh42 - Score: 30 - 03/14/14 @ 00:28
:s/:/\r  /g|%s/=>/: /g<CR>3wi<CR><Esc>ZZ

0 comments

#58 Zach Kemp / @zvksf - Score: 31 - 12/13/13 @ 15:21
:%s;:;\r  ;g<CR>qalR: <Esc>-q2@a%i<CR><Esc>ZZ

0 comments

#59 w1zeman1p / @wizemanip - Score: 32 - 05/09/14 @ 21:03
:%s/:\(\w\)=>/\r  \1: /g<CR>A<BS><CR>}<Esc>ZZ

0 comments

#60 Eric Andres / @eric_m_andres - Score: 37 - 12/04/12 @ 13:37
:%s/:/\r/g<CR>f3a<CR><Esc>2G<C-V>jjI  <Esc>f=<C-V>ljjc: <Esc>ZZ

0 comments

#61 Jesse Nazario / @JesseNazario - Score: 37 - 04/19/13 @ 11:58
a<CR><BS>  <Esc>f,a<CR><Esc>;.f]f}i<CR><Esc>kw<C-V>2kdpl<C-V>2jlc <Esc>ZZ

0 comments

#62 Joshua Travis / @jktravis - Score: 38 - 11/27/12 @ 18:29
:s/:/\r/g<CR>$i<CR><Esc>kI  <Esc>k.k.:%s/=>:<BS>/: /<CR>ZZ

0 comments

#63 Ravi S Sinha / @ambidextrousTx - Score: 38 - 11/28/12 @ 15:49
:s/:/\r:/g<CR>$i<CR><Esc>kqaxpI  <Esc>f=xR <Esc>0kq2@aZZ

0 comments

#64 Oliver Christ / @0liverChrist - Score: 39 - 10/04/13 @ 15:13
a<CR><BS><End><Left><CR><Up><Esc>qaxpa <Del><Del><Right><Right><CR>q<BS><Esc>q@a@addk<C-V>kkI  <Esc>ZZ

0 comments

#65 Tomasz Jureczko / @codehaha - Score: 41 - 11/27/12 @ 13:01
:s/[{,]/&\r/g<CR>:%s/:\(.\)=>/  \1: /<CR>$i<CR><Esc>ZZ

0 comments

#66 Vimgolf Pikob / @vimgolfpikob - Score: 42 - 12/02/12 @ 11:00
:s/:\(.\)=>\(.\),\=/<C-V><CR>  \1: \2,/g<CR>f,r<CR>z<BS>ZZ

0 comments

#67 Jim Jones / @zimzumzam - Score: 46 - 08/14/13 @ 03:23
:s/:/\r/g<CR>$$i<CR><Esc>kI  <Esc>k.jkk.:%s/=>:<BS>/: /<CR>:<BS><C-Z>:wq<CR>

0 comments

#68 One More Anonymous / @anonymous_joe - Score: 49 - 04/16/13 @ 06:12
:%s/:/<C-V><CR>/g<CR>:5<BS>%s/=>/: /g<CR><C-V>kkI  <Esc>kllljjjjf}i<CR><Esc>:wq<CR>

0 comments

#69 Scott Harvey / @scottharveyco - Score: 54 - 11/29/12 @ 01:23
a<CR><BS>  <Esc>f2hhhhi<CR><Esc>2f:i<CR><Esc>f}i<CR><Esc><Esc>:%s/://g<CR><Esc>:%s/=>/: /g<CR><Esc>:wq<CR>

0 comments

#70 A.B / @_a0b_ - Score: 71 - 04/30/13 @ 11:51
:<Up>set shiftwidth=2<CR>=G:<Up><Down>%s/:/\r/g<CR>g_i<Esc>a<CR><Esc>:<Up><Up><Down><Left><Left><Left><Left><Left><BS>=><Right><Right><Right><BS><BS>: <CR>gg=G:w<BS>wq<CR>

0 comments

#71 Chris Maguire / @chriswmaguire - Score: 104 - 11/28/12 @ 07:01
a<CR><<BS><Esc><<CR><Esc><BS><BS>jjx  hhi  <Esc>llllhlhhhxa:<Esc>lxxi <Esc>lll<CR><CR>i<CR>x<BS><Esc>lxlxxi: <Esc>lll<CR>i<CR><Esc>xhxxi  <Esc>ll:<Esc>i: x<BS><BS><Esc><Esc>lxx <BS>i <Esc>lli<CR><Esc><Esc>:wq<CR>

0 comments

Created by: @VimLondon

71 active golfers, 198 entries

Leaderboard (lowest score wins):
I3_normal
23
#1 - Adelar S. Queiróz / @adelarsq

11/28/2012 at 02:58PM

13d759168b89a9659f222508d07419e5_normal
23
#2 - Harry Garrood / @hdgarrood

12/03/2012 at 03:34PM

0e620322b2c292d069fe93e27c081f9c_normal
23
#3 - Petro Тrouq / @zulolosi

06/07/2013 at 02:06PM

40051_789281885907_29616532_44170636_2091417_n_normal
24
#4 - Conner McDaniel / @connermcd

11/27/2012 at 08:40PM

Default_profile_1_normal
24
#5 - a24f0600 / @a24f0600

11/28/2012 at 08:41AM

Q6hrg93p4r3hn56thmd0_normal
24
#6 - Urtica dioica / @udioica

12/11/2012 at 11:58PM

8ig-egq0_normal
24
#7 - John Braxler / @braxler

05/06/2014 at 11:15AM

Default_profile_5_normal
24
#8 - alex scott / @4l3xsc0tt

07/02/2014 at 06:41AM

Av_normal
25
#9 - Vasil Sakarov / @vsakarov

11/29/2012 at 05:07PM

Twitterprofile_normal
26
#10 - Daniel Lundin / @danielundin

11/28/2012 at 03:57AM

7bf7f7ba630959a5c67b4dfb8cbda9a6_normal
26
#11 - Scott McGinness / @scottie_000

11/29/2012 at 05:32AM

Default_profile_1_normal
26
#12 - Hubba / @HubbaBubbaFett

11/29/2012 at 01:26PM

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

12/02/2012 at 08:30AM

4654945923_eb2c60ee5f_normal
26
#14 - Kerson Hsiao / @KersonHsiao

03/29/2013 at 03:44AM

7bbc92500a24e0892967c51a50f1ff8e_normal
26
#15 - Tyler / @tylerbindon

04/02/2013 at 09:29PM

Bunnies_normal
26
#16 - Trevor Powell / @DoomedBunnies

04/10/2013 at 08:05PM

7bbd949b345fcbcfd812b231aed89f99_normal
26
#17 - Marco Hinz / @_mhinz_

05/26/2013 at 05:22AM

C4065e7d8164bafa96796ecc4b8ca2d7_normal
26
#18 - Bradd Szonye / @bszonye

07/13/2013 at 11:51PM

Default_profile_2_normal
27
#19 - Adam Dratwinski / @adwinsky

11/27/2012 at 01:07PM

Default_profile_3_normal
27
#20 - mattgibb / @mattgibb

11/27/2012 at 01:10PM

3ubh7kcfj18s5m9erc6p_normal
27
#21 - Marcin Sza / @coot_

11/27/2012 at 06:04PM

Default_profile_0_normal
27
#22 - Nick Bakkegaard / @Bakkemand

11/28/2012 at 05:44AM

59a790b53a69a3f029cfcf5771c64b5f_normal
27
#23 - Tom Cammann / @tea_sea

11/28/2012 at 09:07AM

Default_profile_5_normal
27
#24 - Jason Wolf / @zephyr_wolf

11/28/2012 at 11:49AM

Eightbit-2a215f18-1fb1-4906-aca2-abb838039f59_normal
27
#25 - meatcar / @meatcar

11/28/2012 at 12:04PM

Pupulon_normal
27
#26 - David Barnett / @mu_mind

11/29/2012 at 02:38AM

585f7ec03d6b11e19896123138142014_7_normal
27
#27 - Jordan Eldredge / @captbaritone

11/30/2012 at 09:40PM

Normal_normal
27
#28 - Django Janny / @keltroth

12/08/2012 at 08:34AM

Image_normal
27
#29 - DJ LoBraico / @pygatea

12/11/2012 at 03:13PM

Default_profile_6_normal
27
#30 - Lari / @larifariman

12/27/2012 at 04:27PM

Tare_normal
27
#31 - martha / @hellomartha

01/17/2013 at 06:44AM

Default_profile_6_normal
27
#32 - brett / @brettyukich

09/22/2013 at 06:00AM

Default_profile_2_normal
27
#33 - Clement Kinder / @ClementKinder

03/06/2014 at 02:07AM

Netti_pihlajo1_lthumb_normal
27
#34 - Joonas Pihlajamaa / @jokkebk

03/07/2014 at 04:35AM

Rsbdr2hz_normal
27
#35 - Nic West / @west_nic

06/21/2014 at 08:09AM

Default_profile_5_normal
28
#36 - Felix Ingram / @lllamaboy

11/27/2012 at 01:13PM

33e51abf6ad5f40cc75a1bb5c0bb8de9_normal
28
#37 - Vim London / @VimLondon

11/27/2012 at 01:15PM

Face_icon_normal
28
#38 - Akira Matsuda / @a_matsuda

11/27/2012 at 11:23PM

Img_3126__1__normal
28
#39 - Pawel Obrok / @mrYapee

11/28/2012 at 01:19AM

9aaede1a87631c292fd5e27c5df320be_normal
28
#40 - n0nick / @n0nick

12/17/2012 at 08:29AM

Default_profile_5_normal
28
#41 - Benjamin Thomas / @PryFlack

01/05/2013 at 05:28PM

F184550fb0a9356cb7e49169db489f32_normal
28
#42 - Daniel Jonsson / @DanielJonss

01/18/2013 at 04:49AM

Chris_normal
28
#43 - Chris Trombley / @ctrombley

01/28/2013 at 10:26AM

12e3ab10a91992d5eed681da5d171823_normal
28
#44 - Steve Tjoa / @stevetjoa

02/04/2013 at 10:26PM

Default_profile_0_normal
28
#45 - Ram Tamtam / @ramtamtamtam

07/02/2014 at 03:58AM

Image_normal
29
#46 - Kerry Burke / @kurver

11/27/2012 at 11:20PM

Vcwwccib_normal
29
#47 - Pete Johns / @johnsyweb

11/28/2012 at 11:28AM

Default_profile_3_normal
29
#48 - Lieven Keersmaekers / @LievenKeersmaek

11/30/2012 at 08:06AM

Emblemofroto_normal
29
#49 - Glen / @Glen_S

11/30/2012 at 03:11PM

Nobel_mud_normal
29
#50 - Panupan S. / @lionpeal

01/11/2013 at 03:58PM

Default_profile_5_normal
29
#51 - cj / @cj01101

08/16/2013 at 09:08PM

Scan-080926-0017_normal
29
#52 - Jonathan Kim / @jonnykim

08/27/2013 at 12:53PM

0efce70dfb1eef981211c87ec2fcde93_normal
29
#53 - Sam Burk / @smwbk

12/22/2013 at 09:43AM

D4515f167905779885d7de8897002f66_normal
30
#54 - Claudio Ortolina / @cloud8421

11/27/2012 at 01:03PM

Untitled-1_normal
30
#55 - Chase Stubblefield / @sterlingchase

04/28/2013 at 10:28PM

Myprofileimage_normal
30
#56 - Woojung Kim 김우중 / @_kimwz

07/15/2013 at 03:35AM

3ojmphwb_normal
30
#57 - Rolinh / @Rolinh42

03/14/2014 at 12:28AM

Default_profile_4_normal
31
#58 - Zach Kemp / @zvksf

12/13/2013 at 03:21PM

Odjq-8ux_normal
32
#59 - w1zeman1p / @wizemanip

05/09/2014 at 09:03PM

Profilepic_normal
37
#60 - Eric Andres / @eric_m_andres

12/04/2012 at 01:37PM

Default_profile_3_normal
37
#61 - Jesse Nazario / @JesseNazario

04/19/2013 at 11:58AM

H0dt83ovy5hejzqrwue6_normal
38
#62 - Joshua Travis / @jktravis

11/27/2012 at 06:29PM

Ba1070d8841ff40257904144ae3db536_normal
38
#63 - Ravi S Sinha / @ambidextrousTx

11/28/2012 at 03:49PM

Default_profile_2_normal
39
#64 - Oliver Christ / @0liverChrist

10/04/2013 at 03:13PM

Autumn11_winners3_normal
41
#65 - Tomasz Jureczko / @codehaha

11/27/2012 at 01:01PM

Default_profile_1_normal
42
#66 - Vimgolf Pikob / @vimgolfpikob

12/02/2012 at 11:00AM

Default_profile_3_normal
46
#67 - Jim Jones / @zimzumzam

08/14/2013 at 03:23AM

Crab_normal
49
#68 - One More Anonymous / @anonymous_joe

04/16/2013 at 06:12AM

Scott_small_normal
54
#69 - Scott Harvey / @scottharveyco

11/29/2012 at 01:23AM

Avatar_normal
71
#70 - A.B / @_a0b_

04/30/2013 at 11:51AM

Chris_gravatar_normal
104
#71 - Chris Maguire / @chriswmaguire

11/28/2012 at 07:01AM