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):
16
#181 - Павел Игоревич / @VizierST

06/21/2016 at 10:55PM

16
#182 - Kerson Hsiao / @KersonHsiao

06/28/2016 at 08:32AM

16
#183 - Reuben Huxley / @missiontocode

06/29/2016 at 05:50AM

16
#184 - Alex Rod. / @thealex23ro

06/30/2016 at 12:30AM

16
#185 - Vaisian / @Vaisian

07/03/2016 at 06:21PM

16
#186 - Ealhad / @Ealhad

07/13/2016 at 10:46PM

16
#187 - Nat / @ntzm_

07/15/2016 at 11:18AM

16
#188 - kwa / @kwa129

07/20/2016 at 01:34AM

16
#189 - Bran / @brandypix

07/22/2016 at 09:50PM

16
#190 - Jeremiah Goyette / @JeremiahGoyette

07/30/2016 at 05:20AM

16
#191 - Walker Boh / @walker_boh

08/09/2016 at 08:48AM

16
#192 - Paulo Dalla Santa / @pdallasanta

08/22/2016 at 02:48PM

16
#193 - citaret / @citaret

08/24/2016 at 12:11AM

16
#194 - Winfried Puchinger / @winpuc

08/29/2016 at 07:32AM

16
#195 - Alexey / @AlexeyKarpelev

09/02/2016 at 07:13AM

16
#196 - Rohan Orton / @rohan_orton

09/06/2016 at 09:53AM

16
#197 - Chris / @Gaunah_

09/07/2016 at 04:44PM

16
#198 - 박 재 성 / @javajigi

09/23/2016 at 03:21AM

16
#199 - Jeremiah Gibson / @jeremiah4691

09/29/2016 at 04:41PM

16
#200 - KangHun Seo / @shirano80

10/31/2016 at 02:47AM

16
#201 - Kracejic / @kracejic

10/31/2016 at 04:23PM

16
#202 - Craig Langford / @cllangfo

12/11/2016 at 11:07PM

16
#203 - Roey Berman / @ManBergundyPig

12/17/2016 at 10:46PM

16
#204 - Pierre Maoui / @poupougnac

12/19/2016 at 03:25PM

16
#205 - hen don / @hendon112

02/26/2017 at 12:15PM

16
#206 - Dimitar Ivanov / @dimisthoughts

03/12/2017 at 06:08AM

16
#207 - Andreas Anderbach / @anderbacha

03/20/2017 at 02:51PM

16
#208 - Solomon / @Trugbildjaeger

04/02/2017 at 09:28AM

16
#209 - Nicolás Alvarez / @nicoa_bb_ba_ar

04/25/2017 at 09:55PM

16
#210 - FC / @FC37138806

05/10/2017 at 11:23PM