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):
13
#181 - Ben Carney / @ben_carney

09/24/2019 at 10:32PM

13
#182 - Lory / @Lory46845742

11/22/2019 at 10:42AM

13
#183 - Quark / @PuzzleQuark

03/22/2020 at 06:16PM

13
#184 - Ryan Nevius / @ryannevius

03/28/2020 at 07:55PM

13
#185 - RockerZZY / @rocker_zzy

06/18/2020 at 11:59PM

13
#186 - Michel Viktor / @tomkpz

08/11/2021 at 08:43PM

13
#187 - Jean George / @JeanGeo20504212

01/14/2022 at 05:50PM

13
#188 - blabla zincou / @BZincou

03/24/2022 at 08:44PM

13
#189 - MC / @MC88686523

03/25/2023 at 04:24PM

14
#190 - Josh Weinberg / @jcweinberg

12/31/2010 at 07:14PM

14
#191 - Prody / @Prody225

12/31/2010 at 07:16PM

14
#192 - Steve Morrow / @yawmark

12/31/2010 at 07:24PM

14
#193 - Leeward Bound / @leewardbound

12/31/2010 at 07:34PM

14
#194 - michael caviness / @michaelmichael

12/31/2010 at 08:08PM

14
#195 - Marian Schubert / @MarianSchubert

12/31/2010 at 08:34PM

14
#196 - Nándor Komzák / @rubymood

12/31/2010 at 09:44PM

14
#197 - Dan / @opello

12/31/2010 at 11:28PM

14
#198 - Mattiassich Ákos / @mattiassicha

01/01/2011 at 02:34PM

14
#199 - Aurélien Delahaye / @alkove

01/01/2011 at 06:55PM

14
#200 - ninereeds / @ninereeds

01/01/2011 at 07:23PM

14
#201 - Ilya Ermolin / @ermolinis

01/01/2011 at 08:33PM

14
#202 - Christopher Sexton / @crsexton

01/02/2011 at 03:37AM

14
#203 - Pete Johns / @johnsyweb

01/02/2011 at 06:36AM

14
#204 - Akira Matsuda / @a_matsuda

01/02/2011 at 04:00PM

14
#205 - David Bengoa / @DvdBng

01/02/2011 at 09:54PM

14
#206 - Aaron Bull Schaefer / @elasticdog

01/05/2011 at 12:16AM

14
#207 - Jean-Christophe Cyr / @jccyr01

05/28/2011 at 04:52AM

14
#208 - wusher / @wusher

05/31/2011 at 09:00PM

14
#209 - David / @dpa_92

08/04/2011 at 08:16AM

14
#210 - Gary Rennie / @TheGazler

08/04/2011 at 07:55PM