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):
13
#151 - Mark Inksa / @MInksaCS

05/10/2014 at 11:57PM

13
#152 - Pedro Santos / @pedrosans

06/20/2014 at 09:19PM

13
#153 - Blake / @blkbsstt

08/08/2014 at 07:02AM

13
#154 - LC / @leeren

08/09/2014 at 09:52PM

13
#155 - Michael Comerford / @MComerford1

09/25/2014 at 01:19PM

13
#156 - eBrnd / @eBrnd

11/04/2014 at 12:26AM

13
#157 - Dimitar Dimitrov / @kurkale6ka

03/18/2016 at 02:07PM

13
#158 - tobyh / @tobyh

06/19/2016 at 03:14AM

13
#159 - Will / @obiwan__k3n00bi

09/03/2016 at 06:33AM

13
#160 - sijinyuan / @sijinyuan

03/13/2017 at 02:46AM

13
#161 - Wang Wu / @rubepeg

05/13/2017 at 07:12AM

13
#162 - tom patterson / @pattertom

08/10/2017 at 10:49PM

13
#163 - Arijus / @argshook

03/15/2018 at 01:25PM

13
#164 - Paul Draghicescu / @pdragy

05/11/2018 at 04:48AM

13
#165 - Bart Kleijngeld / @BartKleijngeld

12/24/2018 at 08:38PM

13
#166 - Mihai / @mihaicristiant

01/03/2019 at 03:48PM

13
#167 - Nick Yeow / @nickyeow

05/22/2019 at 01:53PM

13
#168 - Ivo Blöchliger / @aigledesalpes

08/18/2019 at 09:46PM

13
#169 - Kenny Low / @kennylow

08/30/2019 at 04:53PM

13
#170 - Ben Carney / @ben_carney

09/24/2019 at 10:32PM

13
#171 - Lory / @Lory46845742

11/22/2019 at 10:42AM

13
#172 - Quark / @PuzzleQuark

03/22/2020 at 06:16PM

13
#173 - Ryan Nevius / @ryannevius

03/28/2020 at 07:55PM

13
#174 - RockerZZY / @rocker_zzy

06/18/2020 at 11:59PM

13
#175 - Michel Viktor / @tomkpz

08/11/2021 at 08:43PM

13
#176 - Jean George / @JeanGeo20504212

01/14/2022 at 05:50PM

13
#177 - blabla zincou / @BZincou

03/24/2022 at 08:44PM

14
#178 - Josh Weinberg / @jcweinberg

12/31/2010 at 07:14PM

14
#179 - Prody / @Prody225

12/31/2010 at 07:16PM

14
#180 - Steve Morrow / @yawmark

12/31/2010 at 07:24PM