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

550 active golfers, 1865 entries

Leaderboard (lowest score wins):
21
#391 - Meriadec Pillet / @loomisBroom

09/27/2016 at 11:44AM

21
#392 - king_zorba / @StrangeZorba

09/28/2016 at 03:42PM

21
#393 - Netrisk Cool / @C00lt0

09/29/2016 at 06:16PM

21
#394 - Michael Hoffmann / @micha66545852

02/28/2017 at 03:28PM

21
#395 - MacBookGyver / @MacBookGyver

03/05/2017 at 10:30AM

21
#396 - Stephan Bugnon / @stephanbugnon

03/24/2017 at 05:01PM

21
#397 - Terrance Robotham / @t_robotham

04/11/2017 at 10:26AM

21
#398 - Joel Meyer-Hamme / @JoelMeyerHamme

06/20/2017 at 09:51PM

21
#399 - Owen / @owengeorge_

09/26/2017 at 12:28PM

21
#400 - Geoff / @RealGeoffErwin

09/29/2017 at 03:18PM

21
#401 - BPD / @brian_doyle

11/14/2017 at 01:27PM

21
#402 - BareTull / @BareTull3

12/03/2017 at 08:53PM

21
#403 - maks kamnikar / @maks_kamnikar

01/08/2018 at 02:34PM

21
#404 - TachyG / @Tachypsychique

01/29/2018 at 01:47PM

21
#405 - Chris Dean / @ChrisDe62379742

06/12/2018 at 02:21PM

21
#406 - Scott / @chil2

04/01/2019 at 07:42PM

21
#407 - alekfed / @alek_fed

04/15/2019 at 08:38AM

21
#408 - Jason Chen / @chezbgone

07/04/2019 at 07:34AM

22
#409 - Michael Donux / @foodtooth

05/30/2016 at 06:18AM

22
#410 - Matt Williamson / @mddubs

06/03/2016 at 05:08PM

22
#411 - 李超 / @lichaorodxx

06/10/2016 at 06:22PM

22
#412 - Ram Tamtam / @ramtamtamtam

06/17/2016 at 02:30PM

22
#413 - Adrien Fabre / @statox42

07/11/2016 at 01:42PM

22
#414 - Sarang Khim / @sarang_khim

08/02/2016 at 05:30AM

22
#415 - George Angelopoulos / @g_usermod

08/04/2016 at 07:33PM

22
#416 - Bendik Samseth / @BSamseth

09/19/2016 at 09:10PM

22
#417 - Søren / @natlampen

09/20/2016 at 04:22PM

22
#418 - Bill Ruddock / @biinari

10/25/2016 at 05:20AM

22
#419 - Cù Hữu Hoàng / @Cuhuuhoang

02/14/2017 at 01:36PM

22
#420 - squdle / @squdle

06/24/2017 at 10:17AM