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 494 remaining solutions by signing in and submitting your own entry
#495 Jinotega / @Jinotega3000 - Score: 89 - 12/29/16 @ 20:54
jjWwi<CR><BS><BS><BS><BS><BS>      jk<BS><BS><Esc>wwwwijk<BS><BS>hi<BS><BS><Esc>i<CR><BS><BS><BS><BS><BS><BS><CR><BS><BS><BS><BS><BS>      <Esc>wwwwwwwwwbbbhi<CR><BS><BS><BS><BS><BS>      <Esc>j:wq<CR>

0 comments


Created by: @Benoit_Tgt

495 active golfers, 1685 entries

Leaderboard (lowest score wins):
15
#31 - Nobody. Really. / @KubaNobody

05/27/2016 at 01:07PM

15
#32 - Herbert Kagumba / @HabuKagumba

05/30/2016 at 11:13AM

15
#33 - Taylor Brandstetter / @taybrands

05/31/2016 at 06:39PM

15
#34 - ZhaoyiZhang / @ZhaoyiZhang

06/01/2016 at 01:46AM

15
#35 - pwahs / @PwahsWeisz

06/01/2016 at 09:56AM

15
#36 - Foo Bar / @foobar01123

06/02/2016 at 08:35AM

15
#37 - Panashe M Fundira / @PFundz

06/02/2016 at 02:21PM

15
#38 - Dan Bradbury / @PandaStash

06/03/2016 at 05:29AM

15
#39 - CF / @obvman

06/03/2016 at 07:44AM

15
#40 - Mattias Prada / @apelsinet

06/03/2016 at 08:22PM

15
#41 - Zach Boatrite / @ZachBoatrite

06/05/2016 at 04:29AM

15
#42 - T. Sakuma / @taku39

06/05/2016 at 09:29AM

15
#43 - tgmeng / @lazy_fabric

06/07/2016 at 02:05AM

15
#44 - Ameen P / @Ameen_P1

06/07/2016 at 04:59PM

15
#45 - jan sos / @jann6373

06/12/2016 at 01:29PM

15
#46 - Mihai Crăiță / @mihai_craita

06/12/2016 at 02:11PM

15
#47 - Robert Basic / @robertbasic

06/13/2016 at 12:58PM

15
#48 - Paweł Smołka / @pawelsmolka

06/14/2016 at 02:00PM

15
#49 - TaoChen / @632143592Tao

06/15/2016 at 05:58AM

15
#50 - David Millman / @dlmillman

06/15/2016 at 02:12PM

15
#51 - mac calmar / @calmarc

06/15/2016 at 03:49PM

15
#52 - Dave O'Keeffe / @daveok

06/15/2016 at 08:41PM

15
#53 - Garph0 / @garph0

06/17/2016 at 08:58AM

15
#54 - Jacob Niehus / @wilywampa

06/18/2016 at 08:39PM

15
#55 - Timothy Caleb Nordlo / @tnordloh

06/22/2016 at 04:12AM

15
#56 - Byron Marohn / @byron_marohn

06/22/2016 at 10:53PM

15
#57 - Yifan Ge / @gyifan

06/23/2016 at 05:27PM

15
#58 - Jeanno / @JeannoHS

06/27/2016 at 06:53AM

15
#59 - Pedro Santos / @pedrosans

07/06/2016 at 06:43PM

15
#60 - Sandeep Dhavale / @sandeep_dhavale

07/15/2016 at 01:47AM