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):
12
#61 - Joonas Pihlajamaa / @jokkebk

03/19/2014 at 01:13PM

12
#62 - Luke Ellis / @slav0x

03/22/2014 at 12:51AM

12
#63 - John Braxler / @braxler

04/04/2014 at 05:52PM

12
#64 - ZorgroZ / @ZorgroZ

04/12/2014 at 04:30PM

12
#65 - Amir Kremer / @AmirKremer

05/07/2014 at 01:11PM

12
#66 - John Meisner / @jmeisned

06/27/2014 at 05:11PM

12
#67 - asd fsdf / @totallythr

10/30/2014 at 04:09AM

12
#68 - Malte R / @maltoe

11/30/2014 at 06:46PM

12
#69 - kimber gonzalez / @kimberlycreates

01/20/2015 at 08:04PM

12
#70 - Ben LeMasurier / @lemasurier

02/01/2015 at 01:48AM

12
#71 - Felix / @DoubleFelix_

02/24/2015 at 07:55AM

12
#72 - David Nguyen / @nguydavi

06/05/2015 at 06:56PM

12
#73 - Léo S / @LeoSauvaget

09/22/2015 at 06:05PM

12
#74 - Jon Krause / @jkrause314

12/19/2015 at 09:12AM

12
#75 - Ikypiky / @nerdbeereis

06/15/2016 at 11:59PM

12
#76 - Jim Bob / @babyclubber

02/28/2017 at 12:12AM

12
#77 - Zhihong Liu / @pieapple03

03/03/2017 at 04:38PM

12
#78 - Peter Sand / @PeterSand12

03/11/2017 at 02:26PM

12
#79 - Daniel / @Daniel00288663

03/30/2017 at 03:26PM

12
#80 - Remus Dalrymple / @bornintheflames

05/09/2017 at 12:48AM

12
#81 - James Houghton / @jamesthoughton

05/20/2017 at 12:27AM

12
#82 - Ben Hill / @KaizenSoze70

10/30/2017 at 11:59AM

12
#83 - Turkey Man / @lvturkeyman

11/23/2017 at 08:40AM

12
#84 - Alphonse Mariya / @alfunx

01/14/2018 at 01:11PM

12
#85 - Evgeny`s Kindle / @EvgenyKindle

04/25/2018 at 07:19AM

12
#86 - DHM / @DHM29978992

04/30/2018 at 01:03AM

12
#87 - name / @name65894813

11/28/2018 at 03:56PM

12
#88 - Dax / @zacoxi

12/05/2018 at 05:35AM

12
#89 - Patrick Lavin / @LavinComputes

01/31/2019 at 01:34AM

12
#90 - alekfed / @alek_fed

04/16/2019 at 11:59AM