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 50b5266f448d770002000106

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


Created by: @VimLondon

95 active golfers, 267 entries

Leaderboard (lowest score wins):
23
#1 - Adelar S. Queiróz / @adelarsq

11/28/2012 at 10:58PM

23
#2 - harry 🏳️‍🌈 / @hdgarrood

12/03/2012 at 11:34PM

23
#3 - Petro Тrouq / @zulolosi

06/07/2013 at 09:06PM

23
#4 - blabla zincou / @BZincou

04/20/2022 at 11:37PM

23
#5 - Peppa Pig / @PeppaPi95550250

07/03/2024 at 06:23AM

23
#6 - nickGPT / @nickandbro

08/28/2024 at 07:19PM

24
#7 - Conner McDaniel / @connermcd

11/28/2012 at 04:40AM

24
#8 - a24f0600 / @a24f0600

11/28/2012 at 04:41PM

24
#9 - Urtica dioica / @udioica

12/12/2012 at 07:58AM

24
#10 - John Braxler / @braxler

05/06/2014 at 06:15PM

24
#11 - alexscott / @4l3xsc0tt

07/02/2014 at 01:41PM

24
#12 - Turkey Man / @lvturkeyman

12/06/2017 at 10:09AM

24
#13 - DHM / @DHM29978992

05/29/2018 at 12:45AM

24
#14 - Jean George / @JeanGeo20504212

06/08/2022 at 02:01PM

25
#15 - Vasil Sakarov / @vsakarov

11/30/2012 at 01:07AM

26
#16 - Daniel Lundin / @danielundin

11/28/2012 at 11:57AM

26
#17 - Scott McGinness / @scottie_000

11/29/2012 at 01:32PM

26
#18 - Hubba / @HubbaBubbaFett

11/29/2012 at 09:26PM

26
#19 - じょんあば / @john_ababa

12/02/2012 at 04:30PM

26
#20 - Kerson Hsiao / @KersonHsiao

03/29/2013 at 10:44AM

26
#21 - Tyler / @tylerbindon

04/03/2013 at 04:29AM

26
#22 - Trevor Powell / @DoomedBunnies

04/11/2013 at 03:05AM

26
#23 - Marco Hinz / @_mhinz_

05/26/2013 at 12:22PM

26
#24 - Bradd Szonye / @bszonye

07/14/2013 at 06:51AM

27
#25 - Adam Dratwinski / @adwinsky

11/27/2012 at 09:07PM

27
#26 - mattgibb / @mattgibb

11/27/2012 at 09:10PM

27
#27 - Marcin Szamotulski / @me_coot

11/28/2012 at 02:04AM

27
#28 - Nick Bakkegaard / @Bakkemand

11/28/2012 at 01:44PM

27
#29 - T / @tea_sea

11/28/2012 at 05:07PM

27
#30 - Jason Wolf / @zephyr_wolf

11/28/2012 at 07:49PM