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 621 remaining solutions by signing in and submitting your own entry
#622 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

622 active golfers, 2098 entries

Leaderboard (lowest score wins):
27
#571 - José / @AngelGaldamez

08/28/2019 at 01:09AM

28
#572 - J. Cosa / @esoesotracosa

01/16/2017 at 12:18PM

28
#573 - Михаил Добров / @mSuGfwFz2ZNvv5b

07/10/2017 at 08:38PM

28
#574 - Shunichi Kanade / @shunkana

11/18/2018 at 08:07AM

28
#575 - majestic sloth / @SamLlama

08/13/2019 at 06:59AM

28
#576 - Charlie OConor / @charlieoconor

10/07/2019 at 06:26PM

28
#577 - Aaron / @_Lordofthevoid_

11/29/2019 at 05:20PM

28
#578 - Martin Kauppinen / @MartinKauppinen

08/16/2020 at 03:52PM

28
#579 - Anil Narayan / @AnilNarayan2013

10/18/2020 at 04:35PM

29
#580 - RAM13 / @cbcvbcxvbcxvb

10/21/2016 at 03:59PM

29
#581 - John Newbery / @jonnynewbs

11/15/2016 at 10:01AM

29
#582 - Chris Snyder / @crsWorldCitizen

04/14/2017 at 08:24PM

29
#583 - Michael Sorhaindo / @pmsorhaindo

04/19/2017 at 11:50AM

29
#584 - Patrick S. / @Patst1005

08/08/2019 at 08:00PM

29
#585 - Chris Shorrock / @EbinFlow

08/18/2019 at 05:23PM

29
#586 - Captain Proton / @CaptainProton5

09/03/2021 at 10:10PM

30
#587 - Miki Tebeka / @tebeka

05/13/2016 at 04:23AM

30
#588 - Lieuwe Rooijakkers / @LieuweR

06/05/2016 at 09:10AM

30
#589 - Putente / @Putente_

09/10/2016 at 04:09AM

30
#590 - Loreno Heer / @LorenoHeer

11/07/2017 at 02:34PM

30
#591 - Bennett / @bennettbackward

12/19/2018 at 11:26AM

31
#592 - karcaw / @karcaw

09/02/2016 at 11:40PM

31
#593 - Martin Huter / @marhat87

04/29/2020 at 09:23AM

31
#594 - miguel / @miguel33704096

11/08/2020 at 06:15PM

32
#595 - linealloop / @linealloop

05/18/2017 at 11:29PM

32
#596 - Jo / @Jo59893132

10/25/2018 at 06:15AM

32
#597 - Brandon Harrison / @llAboutB

09/24/2019 at 08:51PM

32
#598 - Daniel Habib / @danielhvs

07/27/2020 at 12:27AM

33
#599 - 최종원 / @lastone9182

07/19/2018 at 10:53AM

34
#600 - prince ducaca / @prince_du_caca

09/27/2018 at 11:08PM