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):
22
#391 - Ram Tamtam / @ramtamtamtam

06/17/2016 at 02:30PM

22
#392 - Adrien Fabre / @statox42

07/11/2016 at 01:42PM

22
#393 - Sarang Khim / @sarang_khim

08/02/2016 at 05:30AM

22
#394 - George Angelopoulos / @g_usermod

08/04/2016 at 07:33PM

22
#395 - Bendik Samseth / @BSamseth

09/19/2016 at 09:10PM

22
#396 - Søren / @natlampen

09/20/2016 at 04:22PM

22
#397 - Bill Ruddock / @biinari

10/25/2016 at 05:20AM

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

02/14/2017 at 01:36PM

22
#399 - squdle / @squdle

06/24/2017 at 10:17AM

22
#400 - Brian Hall / @_bruab_

10/24/2017 at 02:26PM

22
#401 - Benoit Mortgat / @Benoit_Mortgat

11/14/2017 at 07:39AM

22
#402 - Austin Ware / @AustinWare17

03/12/2018 at 07:58PM

22
#403 - Dax / @zacoxi

11/20/2018 at 03:24AM

23
#404 - Max Luzuriaga / @luzuriaga

05/14/2016 at 04:02AM

23
#405 - ba lázs / @sarosbazsi

05/15/2016 at 10:27AM

23
#406 - Jason Pleau / @JasonPleau

05/18/2016 at 02:20PM

23
#407 - 이선협 / @kciter

06/03/2016 at 07:32AM

23
#408 - Karel Vervaeke / @karel1980

06/17/2016 at 12:11PM

23
#409 - Kirill Sidenko / @KirillSidenko

06/19/2016 at 04:21AM

23
#410 - Ryan van Rensburg / @rdvr001

07/16/2016 at 07:44PM

23
#411 - Thongrapee / @kulaspa2

07/25/2016 at 05:03AM

23
#412 - Zach Bush / @zmbush

07/25/2016 at 06:22PM

23
#413 - Michael Brailsford / @brailsmt

08/16/2016 at 06:20PM

23
#414 - さよきみ / @MrIn1121

12/09/2016 at 04:02PM

23
#415 - Eric Bakan / @ericbakan

03/14/2017 at 11:55PM

23
#416 - Riz Joj / @rizjoj

04/03/2017 at 02:05AM

23
#417 - Florian Gauger / @FlorianGauger

06/03/2017 at 01:39AM

23
#418 - jirgn / @jirgn

09/24/2017 at 01:38PM

23
#419 - martin tourneboeuf / @martintournebo1

01/31/2018 at 09:39PM

23
#420 - ewalk153 / @ewalk153

04/01/2018 at 06:42PM