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 by @37fatos:

Unlock 11 remaining solutions by signing in and submitting your own entry
Created by: @Benoit_Tgt

634 active golfers, 2144 entries

Solutions by @37fatos:
15
#159 - A A A / @37fatos

01/15/2021 at 10:01PM

15
#>159 - A A A / @37fatos

01/15/2021 at 10:03PM

15
#>159 - A A A / @37fatos

01/15/2021 at 10:04PM

17
#>261 - A A A / @37fatos

01/15/2021 at 09:56PM

20
#>386 - A A A / @37fatos

01/15/2021 at 09:54PM

21
#>441 - A A A / @37fatos

01/13/2021 at 04:06PM

22
#>470 - A A A / @37fatos

01/13/2021 at 03:52PM

22
#>470 - A A A / @37fatos

01/13/2021 at 04:01PM

22
#>470 - A A A / @37fatos

01/13/2021 at 04:10PM

23
#>496 - A A A / @37fatos

01/13/2021 at 03:49PM

23
#>496 - A A A / @37fatos

01/13/2021 at 04:05PM