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

550 active golfers, 1865 entries

Leaderboard (lowest score wins):
19
#301 - Albertux / @_Albertux

06/20/2016 at 07:08AM

19
#302 - Avery Wilkening / @awilkening

06/24/2016 at 02:30PM

19
#303 - Oliver Christ / @0liverChrist

07/12/2016 at 09:37PM

19
#304 - jn / @j1357924

08/07/2016 at 02:35PM

19
#305 - Maxime Reis / @MaximeReis

08/11/2016 at 04:18PM

19
#306 - swarkEafs / @EafsSwark

08/13/2016 at 06:23PM

19
#307 - Will / @obiwan__k3n00bi

08/13/2016 at 10:00PM

19
#308 - AODQ / @AODQIG

08/20/2016 at 03:27PM

19
#309 - Izabel Jelenić / @IzabelJelenic

08/23/2016 at 03:00PM

19
#310 - Ashish Narasimham / @asheeshkabob

08/31/2016 at 02:26PM

19
#311 - Utkrisht Dhankar / @UtkrishtDhankar

09/07/2016 at 03:33PM

19
#312 - Simon Plantinga / @SimonPlantinga

10/30/2016 at 11:22AM

19
#313 - caplod / @caplod

03/24/2017 at 04:48PM

19
#314 - Acid One / @AcidOne2

05/04/2017 at 08:10AM

19
#315 - Codingpotato / @codingpotato

05/07/2017 at 09:29AM

19
#316 - almostdvs / @almostdvs

05/23/2017 at 02:58AM

19
#317 - BlackCap / @BlackCapCoder

05/24/2017 at 06:11PM

19
#318 - Will Gunther / @WillGunther

06/11/2017 at 07:41PM

19
#319 - Matt Hoffman / @mjhoffman65

08/25/2017 at 01:43PM

19
#320 - sehe / @sehetw

10/10/2017 at 02:22PM

19
#321 - Bradley M. Small / @BradleySmall

11/23/2017 at 01:04AM

19
#322 - BarbaJol / @drpproteus

12/31/2017 at 08:54AM

19
#323 - 默罕默德 / @Rt6RjEAJ987Woes

02/18/2019 at 09:36AM

19
#324 - Branden Clark / @clarkb_cs

06/04/2019 at 05:22AM

19
#325 - hodenkobold66 / @hodenkobold66

06/25/2019 at 01:35PM

19
#326 - Martin Delille / @martinodelilo

08/24/2019 at 02:31PM

20
#327 - AleksandarTrifunovic / @akstrfn

05/12/2016 at 08:20AM

20
#328 - Artūras Zakrevskis / @AZakrevskis

05/12/2016 at 01:35PM

20
#329 - Tautvilas / @TautviIas

05/12/2016 at 01:58PM

20
#330 - Luke Forrest Normile / @Lukeatuke

05/20/2016 at 11:02PM