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 57343555fd77ad227900df4a

Split line with dots

This line is too long, split it.

Start file
class VimGolf
  def split_me
    MyModel.first_method.second_method(arg).third_method(arg.method_one.method_two)
  end
end
End file
class VimGolf
  def split_me
    MyModel
      .first_method
      .second_method(arg)
      .third_method(arg.method_one.method_two)
  end
end

View Diff

3c3,6
<     MyModel.first_method.second_method(arg).third_method(arg.method_one.method_two)
---
>     MyModel
>       .first_method
>       .second_method(arg)
>       .third_method(arg.method_one.method_two)

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 499 remaining solutions by signing in and submitting your own entry
#500 Jinotega / @Jinotega3000 - Score: 89 - 12/29/16 @ 20:54
jjWwi<CR><BS><BS><BS><BS><BS>      jk<BS><BS><Esc>wwwwijk<BS><BS>hi<BS><BS><Esc>i<CR><BS><BS><BS><BS><BS><BS><CR><BS><BS><BS><BS><BS>      <Esc>wwwwwwwwwbbbhi<CR><BS><BS><BS><BS><BS>      <Esc>j:wq<CR>

0 comments


Created by: @Benoit_Tgt

500 active golfers, 1716 entries

Leaderboard (lowest score wins):
19
#301 - Simon Plantinga / @SimonPlantinga

10/30/2016 at 11:22AM

19
#302 - caplod / @caplod

03/24/2017 at 04:48PM

19
#303 - Acid One / @AcidOne2

05/04/2017 at 08:10AM

19
#304 - Codingpotato / @codingpotato

05/07/2017 at 09:29AM

19
#305 - almostdvs / @almostdvs

05/23/2017 at 02:58AM

19
#306 - BlackCap / @BlackCapCoder

05/24/2017 at 06:11PM

19
#307 - Will Gunther / @WillGunther

06/11/2017 at 07:41PM

19
#308 - Matt Hoffman / @mjhoffman65

08/25/2017 at 01:43PM

19
#309 - sehe / @sehetw

10/10/2017 at 02:22PM

19
#310 - Bradley M. Small / @BradleySmall

11/23/2017 at 01:04AM

19
#311 - BarbaJol / @drpproteus

12/31/2017 at 08:54AM

20
#312 - AleksandarTrifunovic / @akstrfn

05/12/2016 at 08:20AM

20
#313 - Artūras Zakrevskis / @AZakrevskis

05/12/2016 at 01:35PM

20
#314 - Tautvilas / @TautviIas

05/12/2016 at 01:58PM

20
#315 - Luke Forrest Normile / @Lukeatuke

05/20/2016 at 11:02PM

20
#316 - Daniel Ericsson / @DanielJEricsson

05/25/2016 at 11:19AM

20
#317 - Joel Gärtner / @Jeerok

05/25/2016 at 07:55PM

20
#318 - wlads / @wlads

05/26/2016 at 11:38PM

20
#319 - Robin Ramael / @RobinRamael

05/30/2016 at 08:18AM

20
#320 - kouh / @kouh_yama

06/02/2016 at 11:28PM

20
#321 - Peter Trotman / @pgtrots

06/05/2016 at 08:12PM

20
#322 - ijemmy / @ijemmy

06/06/2016 at 04:51PM

20
#323 - territorialmale / @territorialmale

06/07/2016 at 04:33PM

20
#324 - Alec Newman / @alecnwmn904

06/07/2016 at 09:01PM

20
#325 - Reece Rushing / @Rush715

06/07/2016 at 09:02PM

20
#326 - Zed Byrne / @ZeByrne

06/13/2016 at 10:08AM

20
#327 - Leavim / @LeavimTain

06/19/2016 at 03:04PM

20
#328 - Amory Schlender / @schlamory

07/08/2016 at 04:51AM

20
#329 - Nikita Danilov / @Mirt_ru

07/17/2016 at 09:01AM

20
#330 - Richard Laub / @RWLaub91

07/22/2016 at 08:03AM