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 @floyd10086:

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

623 active golfers, 2103 entries

Solutions by @floyd10086:
16
#232 - floyd / @floyd10086

03/19/2020 at 06:27AM

17
#>258 - floyd / @floyd10086

03/19/2020 at 04:31AM

18
#>306 - floyd / @floyd10086

03/19/2020 at 02:44AM

19
#>350 - floyd / @floyd10086

03/19/2020 at 01:54AM

19
#>350 - floyd / @floyd10086

03/19/2020 at 02:43AM

20
#>382 - floyd / @floyd10086

03/18/2020 at 10:14AM

21
#>436 - floyd / @floyd10086

03/18/2020 at 10:08AM

21
#>436 - floyd / @floyd10086

03/19/2020 at 01:52AM

22
#>465 - floyd / @floyd10086

03/18/2020 at 10:04AM

25
#>529 - floyd / @floyd10086

03/18/2020 at 10:01AM

26
#>555 - floyd / @floyd10086

03/18/2020 at 09:55AM

27
#>572 - floyd / @floyd10086

03/18/2020 at 10:05AM

28
#>578 - floyd / @floyd10086

03/18/2020 at 09:54AM

29
#>586 - floyd / @floyd10086

03/18/2020 at 09:51AM

32
#>598 - floyd / @floyd10086

03/18/2020 at 09:41AM