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
#31 - Eric Boehs / @ericboehs

12/12/2011 at 10:58PM

12
#32 - Xavier Nayrac / @lkdjiin

12/30/2011 at 03:54PM

12
#33 - Pei-Lun Lee / @ypcatw

01/06/2012 at 02:02PM

12
#34 - Jan Sedivy / @jan_sedivy

02/04/2012 at 07:35PM

12
#35 - John / @OneOhOneOhOneOh

02/05/2012 at 02:42AM

12
#36 - Renat Aksitov / @Korvin79

02/08/2012 at 10:23AM

12
#37 - Ibrahim Tencer / @ibrahimtencer

02/16/2012 at 06:45AM

12
#38 - Jose Fernandez / @jrfernandez

04/28/2012 at 01:13AM

12
#39 - Son of Bongo / @bpcode

05/19/2012 at 03:31AM

12
#40 - Urtica dioica / @udioica

05/29/2012 at 04:07AM

12
#41 - Frank Twitting / @knarfben

07/16/2012 at 01:16PM

12
#42 - Kerson Hsiao / @KersonHsiao

08/01/2012 at 08:37AM

12
#43 - Joseph J. Piché / @jjpiche

08/26/2012 at 04:45AM

12
#44 - Conner McDaniel / @connermcd

09/25/2012 at 12:08AM

12
#45 - Tadas Sce / @tadassce

11/19/2012 at 10:10AM

12
#46 - Asmund / @herrasbe

01/13/2013 at 06:17PM

12
#47 - Adam Bell / @adamgbell

03/21/2013 at 11:30PM

12
#48 - Gtranbot / @gtranbot

04/27/2013 at 10:38AM

12
#49 - Kate / @Arohanui

05/04/2013 at 01:10AM

12
#50 - Marco Hinz / @_mhinz_

05/21/2013 at 01:21PM

12
#51 - Petro Тrouq / @zulolosi

06/28/2013 at 03:53AM

12
#52 - Steve Tjoa / @stevetjoa

07/08/2013 at 05:40AM

12
#53 - Bradd Szonye / @bszonye

07/13/2013 at 12:43PM

12
#54 - Chris Brown / @engineercyb

08/06/2013 at 03:31AM

12
#55 - David Pathakjee / @DavidPathakjee

08/15/2013 at 04:31AM

12
#56 - Lee Jackson / @morphemass

09/20/2013 at 07:00PM

12
#57 - Tyler / @tylerbindon

10/23/2013 at 02:51AM

12
#58 - Casey Dwyer / @caseydwyer

11/04/2013 at 06:48AM

12
#59 - Helge Milde / @helgefmi

02/03/2014 at 02:59PM

12
#60 - Xelrifos / @Xelrifos

02/17/2014 at 04:05PM