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):
29
#571 - Chris Snyder / @crsWorldCitizen

04/14/2017 at 08:24PM

29
#572 - Michael Sorhaindo / @pmsorhaindo

04/19/2017 at 11:50AM

29
#573 - Patrick S. / @Patst1005

08/08/2019 at 08:00PM

29
#574 - Chris Shorrock / @EbinFlow

08/18/2019 at 05:23PM

30
#575 - Miki Tebeka / @tebeka

05/13/2016 at 04:23AM

30
#576 - Lieuwe Rooijakkers / @LieuweR

06/05/2016 at 09:10AM

30
#577 - Putente / @Putente_

09/10/2016 at 04:09AM

30
#578 - Loreno Heer / @LorenoHeer

11/07/2017 at 02:34PM

30
#579 - Bennett / @bennettbackward

12/19/2018 at 11:26AM

31
#580 - karcaw / @karcaw

09/02/2016 at 11:40PM

31
#581 - Martin Huter / @marhat87

04/29/2020 at 09:23AM

32
#582 - linealloop / @linealloop

05/18/2017 at 11:29PM

32
#583 - Jo / @Jo59893132

10/25/2018 at 06:15AM

32
#584 - Brandon Harrison / @llAboutB

09/24/2019 at 08:51PM

32
#585 - Daniel Habib / @danielhvs

07/27/2020 at 12:27AM

33
#586 - 최종원 / @lastone9182

07/19/2018 at 10:53AM

34
#587 - prince ducaca / @prince_du_caca

09/27/2018 at 11:08PM

34
#588 - lucca augusto / @LuccaAugusto6

10/05/2019 at 06:01PM

34
#589 - abhijeet patil / @abhijeetptl5

09/03/2020 at 04:12AM

35
#590 - Nicola Coretti / @NiCoRetti

05/29/2016 at 09:38AM

36
#591 - nieza / @lucaspta1

06/05/2016 at 03:21AM

36
#592 - Brandon Emery Craig / @iambcraig

08/03/2018 at 07:57PM

37
#593 - Ryan Coopersmith / @RyanCoopersmit1

06/04/2017 at 09:16PM

37
#594 - vimgolfacct / @vimgolfacct

07/08/2019 at 01:44AM

42
#595 - Zak / @Zak84202444

01/24/2020 at 04:39PM

45
#596 - Luis Rodriguez / @luisthecoder

11/13/2018 at 03:44AM

45
#597 - Ming Dai / @MingDai2

06/30/2020 at 05:30PM

48
#598 - tuyen / @tuyen66827418

11/28/2018 at 03:18PM

48
#599 - Strages / @Strages2k

02/23/2020 at 10:42AM

49
#600 - Vim Golfer / @VimGolfer6

08/10/2019 at 11:40AM