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

526 active golfers, 1795 entries

Leaderboard (lowest score wins):
19
#301 - Maxime Reis / @MaximeReis

08/11/2016 at 04:18PM

19
#302 - swarkEafs / @EafsSwark

08/13/2016 at 06:23PM

19
#303 - Will / @obiwan__k3n00bi

08/13/2016 at 10:00PM

19
#304 - AODQ / @AODQIG

08/20/2016 at 03:27PM

19
#305 - Izabel Jelenić / @IzabelJelenic

08/23/2016 at 03:00PM

19
#306 - Ashish Narasimham / @asheeshkabob

08/31/2016 at 02:26PM

19
#307 - Utkrisht Dhankar / @UtkrishtDhankar

09/07/2016 at 03:33PM

19
#308 - Simon Plantinga / @SimonPlantinga

10/30/2016 at 11:22AM

19
#309 - caplod / @caplod

03/24/2017 at 04:48PM

19
#310 - Acid One / @AcidOne2

05/04/2017 at 08:10AM

19
#311 - Codingpotato / @codingpotato

05/07/2017 at 09:29AM

19
#312 - almostdvs / @almostdvs

05/23/2017 at 02:58AM

19
#313 - BlackCap / @BlackCapCoder

05/24/2017 at 06:11PM

19
#314 - Will Gunther / @WillGunther

06/11/2017 at 07:41PM

19
#315 - Matt Hoffman / @mjhoffman65

08/25/2017 at 01:43PM

19
#316 - sehe / @sehetw

10/10/2017 at 02:22PM

19
#317 - Bradley M. Small / @BradleySmall

11/23/2017 at 01:04AM

19
#318 - BarbaJol / @drpproteus

12/31/2017 at 08:54AM

19
#319 - 默罕默德 / @Rt6RjEAJ987Woes

02/18/2019 at 09:36AM

20
#320 - AleksandarTrifunovic / @akstrfn

05/12/2016 at 08:20AM

20
#321 - Artūras Zakrevskis / @AZakrevskis

05/12/2016 at 01:35PM

20
#322 - Tautvilas / @TautviIas

05/12/2016 at 01:58PM

20
#323 - Luke Forrest Normile / @Lukeatuke

05/20/2016 at 11:02PM

20
#324 - Daniel Ericsson / @DanielJEricsson

05/25/2016 at 11:19AM

20
#325 - Joel Gärtner / @Jeerok

05/25/2016 at 07:55PM

20
#326 - wlads / @wlads

05/26/2016 at 11:38PM

20
#327 - Robin Ramael / @RobinRamael

05/30/2016 at 08:18AM

20
#328 - kouh / @kouh_yama

06/02/2016 at 11:28PM

20
#329 - Peter Trotman / @pgtrots

06/05/2016 at 08:12PM

20
#330 - ijemmy / @ijemmy

06/06/2016 at 04:51PM