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 607 remaining solutions by signing in and submitting your own entry
#608 Rohan / @themathgeek13 - Score: 100 - 06/12/20 @ 01:40
<Down><Down><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Left><Left><Left>i<CR><BS><BS><BS><BS><BS>      <Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Left><BS>d<CR><BS><BS><BS><BS><BS>      <Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Left><CR><BS><BS><BS><BS><BS>      <Esc>:wq!<CR>

0 comments


Created by: @Benoit_Tgt

608 active golfers, 2043 entries

Leaderboard (lowest score wins):
50
#601 - Jurica / @Jurica34581259

11/15/2018 at 01:29AM

55
#602 - Elias Dräxler / @DraxlerElias

04/29/2020 at 09:30AM

69
#603 - x / @am_zzz_zzz

05/12/2020 at 07:35AM

70
#604 - Jakub Troszok / @zosoooo

06/20/2016 at 03:53PM

70
#605 - Samir Sadek / @netsamir

07/10/2016 at 06:16PM

80
#606 - Justin Sitarz / @justinsitarz

05/30/2019 at 02:43PM

89
#607 - Jinotega / @Jinotega3000

12/29/2016 at 08:54PM

100
#608 - Rohan / @themathgeek13

06/12/2020 at 01:40AM