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):
29
#61 - Panupan S. / @lionpeal

01/11/2013 at 11:58PM

29
#62 - cj / @cj01101

08/17/2013 at 04:08AM

29
#63 - Jonathan Kim / @jonnykim

08/27/2013 at 07:53PM

29
#64 - Sam Burk / @smwbk

12/22/2013 at 05:43PM

29
#65 - Mauro Persano / @fzort

11/16/2014 at 01:30PM

29
#66 - Olivier Bégassat / @zk_evm

06/15/2023 at 08:42PM

29
#67 - shahanavaz m / @shahanavazm

04/04/2024 at 07:31PM

30
#68 - Claudio Ortolina / @cloud8421

11/27/2012 at 09:03PM

30
#69 - Chasetopher / @chasetopherlee

04/29/2013 at 05:28AM

30
#70 - Woojung Kim 김우중 / @_kimwz

07/15/2013 at 10:35AM

30
#71 - Rolinh / @Rolinh42

03/14/2014 at 07:28AM

30
#72 - ltn614 / @ltn614

09/30/2015 at 03:18PM

30
#73 - caplod / @caplod

03/30/2017 at 12:02PM

30
#74 - Pablo Acuna / @pacuna

10/25/2024 at 12:37AM

31
#75 - Zach Kemp / @zvksf

12/13/2013 at 11:21PM

31
#76 - Reuben Narkwo / @reubwo

03/31/2017 at 07:33AM

31
#77 - RockerZZY / @rocker_zzy

07/19/2020 at 01:03PM

32
#78 - CJ Avilla / @cjav_dev

05/10/2014 at 04:03AM

33
#79 - Qing Liu / @poeminlash

11/07/2022 at 03:13PM

34
#80 - Ryan van Rensburg / @rdvr001

07/23/2016 at 12:48PM

35
#81 - 0xf00ff00f / @0xf00ff00f

12/18/2022 at 09:52AM

37
#82 - Eric Andres / @eric_m_andres

12/04/2012 at 09:37PM

37
#83 - Jesse Nazario / @JesseNazario

04/19/2013 at 06:58PM

38
#84 - Joshua Travis / @jktravis

11/28/2012 at 02:29AM

38
#85 - Ravi S Sinha / @ambidextrousTx

11/28/2012 at 11:49PM

38
#86 - POSIX / @po6ix

01/22/2022 at 03:38PM

39
#87 - Oliver Christ / @0liverChrist

10/04/2013 at 10:13PM

39
#88 - Gurukandhamoorthi / @Gurukandhamoor1

08/21/2017 at 03:42PM

41
#89 - Tomasz Jureczko / @codehaha

11/27/2012 at 09:01PM

42
#90 - Vimgolf Pikob / @vimgolfpikob

12/02/2012 at 07:00PM