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 406 remaining solutions by signing in and submitting your own entry
#407 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

407 active golfers, 1249 entries

Leaderboard (lowest score wins):
23
#391 - Trever Marshall / @dynamic_library

10/12/2012 at 08:33PM

23
#392 - Chippy ash / @_rayrain

02/18/2023 at 03:35PM

23
#393 - D G G / @DGJourneyman

02/21/2023 at 05:39AM

24
#394 - Charlie Massry / @charlesmassry

09/03/2014 at 12:24AM

24
#395 - fuku1026 / @fukusuke1026

07/13/2017 at 01:59PM

24
#396 - Afzal Hussain / @afzalhussain23

04/10/2024 at 02:01PM

25
#397 - aimee / @sermoa

01/02/2011 at 08:38PM

25
#398 - Wojciech Pietrzak / @astropanic

06/15/2011 at 12:58PM

25
#399 - Avijit Gupta / @526avijit

03/25/2017 at 08:20AM

27
#400 - Mike Perham / @mperham

01/30/2011 at 11:22PM

28
#401 - Joe Auricchio / @jauricchio

01/01/2011 at 12:29AM

28
#402 - Feanor Celebrimbor / @tumbaletaurea

06/02/2012 at 08:39PM

28
#403 - BiHi / @BiHi

06/14/2012 at 12:01PM

28
#404 - Thomas Hiron / @thomashiron

02/23/2023 at 02:02PM

31
#405 - xiaoao1024 / @xiaoao1024

01/03/2024 at 03:45AM

35
#406 - Ryan / @Rdgy567889

04/30/2023 at 06:09PM

39
#407 - Ed Gibbs / @edward_gibbs

10/05/2011 at 03:59PM