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):
16
#271 - Vincent Isambart / @vincentisambart

12/31/2010 at 10:38PM

16
#272 - Ryan Elmquist / @relmquist

01/01/2011 at 02:41AM

16
#273 - 藤田祥 / Sho Fujita / @fujisho

01/02/2011 at 07:35AM

16
#274 - Gael / @darkael2

01/09/2011 at 01:29PM

16
#275 - Toto l'haricot / @nico_le_terribl

01/09/2011 at 11:20PM

16
#276 - Jeff Sacks / @jeff_sacks

04/09/2011 at 08:43PM

16
#277 - Norbert Wójtowicz / @pithyless

05/19/2012 at 01:24PM

16
#278 - Pedro Franceschi / @pedroh96

02/07/2013 at 03:11AM

16
#279 - A / @Tower_1980

07/29/2013 at 02:00PM

16
#280 - A. N. / @arez42

10/24/2013 at 10:42AM

16
#281 - Mathieu Larouche / @matdube

11/19/2013 at 01:08PM

16
#282 - Sabiki94@ブルスクの人 / @_jptomoya

10/18/2014 at 12:59PM

16
#283 - Konr Larson / @larsonkonr

03/20/2015 at 05:22PM

16
#284 - Gerald Tilma / @GeraldTilma

10/21/2015 at 01:59AM

16
#285 - C. de M. / @gilles_gambier

02/15/2016 at 12:07AM

16
#286 - Ayush Sachdeva / @ayush000

06/05/2017 at 07:45PM

16
#287 - Johannes Reuter / @johannes_reuter

02/10/2018 at 11:59AM

17
#288 - kmymtksh / @kmymtksh

12/31/2010 at 08:12PM

17
#289 - Mariusz Ceier / @mceier

12/31/2010 at 08:27PM

17
#290 - pcapriotti / @pcapriotti

01/01/2011 at 06:26PM

17
#291 - davidnorth / @davidnorth

01/02/2011 at 01:16AM

17
#292 - Brian Buckley / @bbuckley

01/02/2011 at 09:28PM

17
#293 - Felipe Nakandakari / @fenak

01/04/2011 at 07:59PM

17
#294 - Adam Wagner / @awagner83

01/05/2011 at 06:09PM

17
#295 - Yarin Benado / @yarinb

01/06/2011 at 09:33PM

17
#296 - drio / @drio

01/11/2011 at 01:40PM

17
#297 - Jesper Kjeldgaard / @thejspr

03/02/2011 at 07:07AM

17
#298 - Ragunathan Pattabi / @rpattabi

05/04/2011 at 06:23AM

17
#299 - Peter Anselmo / @peter_anselmo

06/29/2011 at 07:50PM

17
#300 - Stephen Gordon / @DubsGordon

08/01/2011 at 11:40PM