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):
15
#151 - vimgolfer / @vimgolfer7

09/30/2019 at 04:31AM

15
#152 - Frank Scholl / @fhscholl

10/27/2019 at 06:46AM

15
#153 - Rui Xue / @ruirayxue

12/27/2019 at 05:34PM

15
#154 - Sylvain Leroux / Yes, I Know IT ! / @Yes_I_Know_IT

04/27/2020 at 11:34PM

15
#155 - Arthur Goodman / @ArthurGoodman3

05/03/2020 at 10:28PM

15
#156 - iBhagwan / @iiBhagwan

05/12/2020 at 10:22PM

15
#157 - roudens / @roudens2

12/17/2020 at 01:50AM

15
#158 - Jung Yeon Park / @park_jungy

01/08/2021 at 05:51PM

15
#159 - A A A / @37fatos

01/15/2021 at 10:01PM

15
#160 - Michel Viktor / @tomkpz

08/10/2021 at 02:58PM

16
#161 - Cristian Lupașcu / @clupasq

05/12/2016 at 09:55AM

16
#162 - Jan Bundesmann / @janbundesmann

05/12/2016 at 11:21AM

16
#163 - mattp (part of the 💉💉💉 club) / @mattpep

05/12/2016 at 03:43PM

16
#164 - damon kelley / @damonkelley

05/12/2016 at 04:02PM

16
#165 - Nick / @Nickwilmes

05/13/2016 at 10:14PM

16
#166 - Ricardo Santos / @TWidXugA

05/14/2016 at 02:15PM

16
#167 - Tom / @CronutFacts

05/15/2016 at 07:55PM

16
#168 - 朱国栋 / @GuodongZhu

05/16/2016 at 09:51PM

16
#169 - Bob Boberson / @BobersonBob7

05/16/2016 at 09:59PM

16
#170 - vic © / @2r2w

05/19/2016 at 04:37PM

16
#171 - Ben Doherty / @bjdgames

05/20/2016 at 05:46AM

16
#172 - Petr Blaho / @petrblaho

05/20/2016 at 11:28AM

16
#173 - Rasmus P / @rasmup

05/21/2016 at 09:41AM

16
#174 - f00b8tr / @f00b8tr5

05/23/2016 at 03:49AM

16
#175 - Victorien Lorcy / @LorcyVictorien

05/28/2016 at 09:49AM

16
#176 - niels aamloos / @AamloosNiels

05/28/2016 at 12:26PM

16
#177 - Fnord Everywhere / @FnordE

06/01/2016 at 02:23PM

16
#178 - Elliott Beach / @718282Beach

06/04/2016 at 11:25PM

16
#179 - Ganesh Datta / @gsdatta

06/05/2016 at 06:58AM

16
#180 - David Cao / @pciex3

06/06/2016 at 06:13AM