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

562 active golfers, 1916 entries

Leaderboard (lowest score wins):
20
#331 - AleksandarTrifunovic / @akstrfn

05/12/2016 at 08:20AM

20
#332 - Artūras Zakrevskis / @AZakrevskis

05/12/2016 at 01:35PM

20
#333 - Tautvilas / @TautviIas

05/12/2016 at 01:58PM

20
#334 - Luke Forrest Normile / @Lukeatuke

05/20/2016 at 11:02PM

20
#335 - Daniel Ericsson / @DanielJEricsson

05/25/2016 at 11:19AM

20
#336 - Joel Gärtner / @Jeerok

05/25/2016 at 07:55PM

20
#337 - wlads / @wlads

05/26/2016 at 11:38PM

20
#338 - Robin Ramael / @RobinRamael

05/30/2016 at 08:18AM

20
#339 - kouh / @kouh_yama

06/02/2016 at 11:28PM

20
#340 - Peter Trotman / @pgtrots

06/05/2016 at 08:12PM

20
#341 - ijemmy / @ijemmy

06/06/2016 at 04:51PM

20
#342 - territorialmale / @territorialmale

06/07/2016 at 04:33PM

20
#343 - Alec Newman / @alecnwmn904

06/07/2016 at 09:01PM

20
#344 - Reece Rushing / @Rush715

06/07/2016 at 09:02PM

20
#345 - Zed Byrne / @ZeByrne

06/13/2016 at 10:08AM

20
#346 - Leavim / @LeavimTain

06/19/2016 at 03:04PM

20
#347 - Amory Schlender / @schlamory

07/08/2016 at 04:51AM

20
#348 - Nikita Danilov / @Mirt_ru

07/17/2016 at 09:01AM

20
#349 - Richard Laub / @RWLaub91

07/22/2016 at 08:03AM

20
#350 - Zdravko Colic / @virtual_key

08/17/2016 at 06:15PM

20
#351 - Alec Goebel / @bewarethegrue

08/21/2016 at 09:38PM

20
#352 - nixi3 / @Nixi3cc

09/05/2016 at 04:51AM

20
#353 - TweetDreams / @TweetMusicians

10/08/2016 at 09:39AM

20
#354 - Christian Rondeau / @c_rondeau

10/15/2016 at 05:13PM

20
#355 - Brian Phelps / @electronjunkie

10/23/2016 at 08:02PM

20
#356 - Daniel Teal / @coelestinian

10/27/2016 at 01:12PM

20
#357 - Patrick Sanan / @patricksanan

01/07/2017 at 02:10PM

20
#358 - Gurukandhamoorthi / @Gurukandhamoor1

07/10/2017 at 10:08AM

20
#359 - Rakesh P / @rakeshpgopal

04/30/2018 at 08:36AM

20
#360 - Bruce Adams / @bruceadams1054

10/08/2018 at 02:20PM