Readable Rubyhash
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
1c1,5 < {: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 94 remaining solutions by signing in and submitting your own entry
#95 Chris Maguire / @chriswmaguire - Score: 104 - 11/28/12 @ 15:01
a<CR><<BS><Esc><<CR><Esc><BS><BS>jjx hhi <Esc>llllhlhhhxa:<Esc>lxxi <Esc>lll<CR><CR>i<CR>x<BS><Esc>lxlxxi: <Esc>lll<CR>i<CR><Esc>xhxxi <Esc>ll:<Esc>i: x<BS><BS><Esc><Esc>lxx <BS>i <Esc>lli<CR><Esc><Esc>:wq<CR>
0 comments