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):
14
#181 - Leeward Bound / @leewardbound

12/31/2010 at 07:34PM

14
#182 - michael caviness / @michaelmichael

12/31/2010 at 08:08PM

14
#183 - Marian Schubert / @MarianSchubert

12/31/2010 at 08:34PM

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

12/31/2010 at 09:44PM

14
#185 - Dan / @opello

12/31/2010 at 11:28PM

14
#186 - Mattiassich Ákos / @mattiassicha

01/01/2011 at 02:34PM

14
#187 - Aurélien Delahaye / @alkove

01/01/2011 at 06:55PM

14
#188 - ninereeds / @ninereeds

01/01/2011 at 07:23PM

14
#189 - Ilya Ermolin / @ermolinis

01/01/2011 at 08:33PM

14
#190 - Christopher Sexton / @crsexton

01/02/2011 at 03:37AM

14
#191 - Pete Johns / @johnsyweb

01/02/2011 at 06:36AM

14
#192 - Akira Matsuda / @a_matsuda

01/02/2011 at 04:00PM

14
#193 - David Bengoa / @DvdBng

01/02/2011 at 09:54PM

14
#194 - Aaron Bull Schaefer / @elasticdog

01/05/2011 at 12:16AM

14
#195 - Jean-Christophe Cyr / @jccyr01

05/28/2011 at 04:52AM

14
#196 - wusher / @wusher

05/31/2011 at 09:00PM

14
#197 - David / @dpa_92

08/04/2011 at 08:16AM

14
#198 - Gary Rennie / @TheGazler

08/04/2011 at 07:55PM

14
#199 - Travis Jeffery / @travisjeffery

11/23/2011 at 07:55AM

14
#200 - William Dunand / @wdunand

11/24/2011 at 09:24AM

14
#201 - Rik Lomas / @riklomas

12/29/2011 at 10:30PM

14
#202 - Vasil Sakarov / @vsakarov

01/17/2012 at 06:50PM

14
#203 - Nolen Royalty / @NolenRoyalty

04/20/2012 at 10:26PM

14
#204 - Zygis Skulteckis / @zygis

05/28/2012 at 01:31PM

14
#205 - Daniel Lundin / @danielundin

07/06/2012 at 01:01PM

14
#206 - Runar / @runarfu

01/12/2013 at 09:52AM

14
#207 - cj / @cj01101

08/08/2013 at 08:49PM

14
#208 - Bart of Denver / @bartofdenver

08/13/2013 at 12:16AM

14
#209 - Matt Robbins / @mcrmfc

08/16/2013 at 07:39AM

14
#210 - Inuka Jayasekera / @a_new_car

08/26/2013 at 09:14AM