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

407 active golfers, 1249 entries

Leaderboard (lowest score wins):
12
#91 - deurzen / @devrzen

06/06/2019 at 01:39PM

12
#92 - Vimfiz / @vimfiz

06/07/2019 at 04:54PM

12
#93 - Sigurður Ægir Jónsso / @siggiae

06/09/2019 at 10:49PM

12
#94 - majo senf / @majo_senf

06/21/2019 at 03:18PM

12
#95 - Himavanth Reddy / @Himavanth1909

08/12/2019 at 06:27AM

12
#96 - Melvin Cheung / @MelvinCheung

11/13/2019 at 02:29AM

12
#97 - Miłosz Łakomy / @foobar01123

12/22/2019 at 03:28PM

12
#98 - Marko / @ultrox

12/28/2019 at 03:05AM

12
#99 - Finlay McAfee / @finsqm

06/09/2020 at 06:46PM

12
#100 - Jason / @jason_eveleth

07/23/2020 at 08:23AM

12
#101 - Salvador Tojo Quintela / @SalvadorTojo

10/08/2021 at 06:15PM

12
#102 - Chris / @cridahtweets

02/26/2022 at 12:30PM

12
#103 - russellzhaomao / @russellzhaomao

05/25/2022 at 03:22AM

12
#104 - x03n046 / @x03n046

06/10/2022 at 12:08AM

12
#105 - Robert Newey / @wiseassbogan

07/09/2022 at 05:56AM

12
#106 - Qing Liu / @poeminlash

07/31/2022 at 04:23AM

12
#107 - Janzen / @__Coos

09/23/2022 at 11:17AM

12
#108 - Alex Lewin / @_AlexLewin

02/22/2023 at 03:30AM

12
#109 - James Reading / @bowly_jim

04/18/2023 at 08:49PM

12
#110 - romache8 / @romache8

02/02/2024 at 08:59AM

12
#111 - Petro Mudrievskyj / @petemud

07/01/2024 at 11:14AM

12
#112 - Peppa Pig / @PeppaPigSg

08/14/2024 at 10:09AM

12
#113 - Suhaib Murshid / @suhaibm

09/01/2024 at 03:32PM

12
#114 - Adi / @adi2004

09/23/2024 at 02:14PM

12
#115 - Pablo Acuna / @pacuna

11/08/2024 at 02:20AM

13
#116 - Douglas Stockwell / @dstockwell

12/31/2010 at 07:27PM

13
#117 - Utkarsh Kukreti / @utkarshkukreti

12/31/2010 at 08:20PM

13
#118 - Henri Bourcereau / @mmai

12/31/2010 at 08:40PM

13
#119 - Alain Gilbert / @alain_gilbert

12/31/2010 at 08:51PM

13
#120 - Behnam Esfahbod / @zwnj

12/31/2010 at 08:54PM