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

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

634 active golfers, 2144 entries

Solutions by @nickandbro:
36
#616 - nickGPT / @nickandbro

08/28/2024 at 03:17AM

37
#>619 - nickGPT / @nickandbro

08/28/2024 at 03:17AM

42
#>620 - nickGPT / @nickandbro

08/28/2024 at 03:17AM

45
#>622 - nickGPT / @nickandbro

08/28/2024 at 03:16AM

48
#>625 - nickGPT / @nickandbro

08/28/2024 at 03:16AM

49
#>626 - nickGPT / @nickandbro

08/28/2024 at 03:16AM

50
#>627 - nickGPT / @nickandbro

08/28/2024 at 03:16AM

55
#>628 - nickGPT / @nickandbro

08/28/2024 at 03:16AM

64
#>628 - nickGPT / @nickandbro

08/28/2024 at 03:16AM

70
#>631 - nickGPT / @nickandbro

08/28/2024 at 03:16AM

80
#>632 - nickGPT / @nickandbro

08/28/2024 at 03:15AM

89
#>633 - nickGPT / @nickandbro

08/28/2024 at 03:15AM

100
#>634 - nickGPT / @nickandbro

08/28/2024 at 03:15AM