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

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

635 active golfers, 2154 entries

Solutions by @jaresty:
15
#72 - jaresty / @jaresty

08/16/2016 at 03:12PM

15
#>72 - jaresty / @jaresty

08/16/2016 at 03:13PM

15
#>75 - jaresty / @jaresty

08/18/2016 at 05:56PM

15
#>77 - jaresty / @jaresty

08/22/2016 at 02:51PM

16
#>198 - jaresty / @jaresty

08/22/2016 at 02:51PM

18
#>286 - jaresty / @jaresty

08/05/2016 at 03:03PM

18
#>286 - jaresty / @jaresty

08/05/2016 at 03:04PM

18
#>286 - jaresty / @jaresty

08/05/2016 at 03:06PM

19
#>328 - jaresty / @jaresty

08/04/2016 at 03:34PM

19
#>328 - jaresty / @jaresty

08/05/2016 at 03:05PM

19
#>332 - jaresty / @jaresty

08/16/2016 at 03:04PM

19
#>332 - jaresty / @jaresty

08/16/2016 at 03:05PM

19
#>332 - jaresty / @jaresty

08/16/2016 at 03:06PM

21
#>411 - jaresty / @jaresty

08/04/2016 at 03:33PM

23
#>482 - jaresty / @jaresty

08/04/2016 at 03:30PM

24
#>499 - jaresty / @jaresty

08/04/2016 at 03:29PM

24
#>499 - jaresty / @jaresty

08/04/2016 at 03:30PM

24
#>500 - jaresty / @jaresty

08/04/2016 at 03:31PM

32
#>603 - jaresty / @jaresty

08/16/2016 at 03:10PM

44
#>621 - jaresty / @jaresty

08/16/2016 at 03:12PM