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

535 active golfers, 1826 entries

Leaderboard (lowest score wins):
21
#391 - MacBookGyver / @MacBookGyver

03/05/2017 at 10:30AM

21
#392 - Stephan Bugnon / @stephanbugnon

03/24/2017 at 05:01PM

21
#393 - Terrance Robotham / @t_robotham

04/11/2017 at 10:26AM

21
#394 - Joel Meyer-Hamme / @JoelMeyerHamme

06/20/2017 at 09:51PM

21
#395 - Owen / @owengeorge_

09/26/2017 at 12:28PM

21
#396 - Geoff / @RealGeoffErwin

09/29/2017 at 03:18PM

21
#397 - BPD / @brian_doyle

11/14/2017 at 01:27PM

21
#398 - BareTull / @BareTull3

12/03/2017 at 08:53PM

21
#399 - maks kamnikar / @maks_kamnikar

01/08/2018 at 02:34PM

21
#400 - TachyG / @Tachypsychique

01/29/2018 at 01:47PM

21
#401 - Chris Dean / @ChrisDe62379742

06/12/2018 at 02:21PM

21
#402 - Scott / @chil2

04/01/2019 at 07:42PM

21
#403 - alekfed / @alek_fed

04/15/2019 at 08:38AM

21
#404 - Jason Chen / @chezbgone

07/04/2019 at 07:34AM

22
#405 - Michael Donux / @foodtooth

05/30/2016 at 06:18AM

22
#406 - Matt Williamson / @mddubs

06/03/2016 at 05:08PM

22
#407 - 李超 / @lichaorodxx

06/10/2016 at 06:22PM

22
#408 - Ram Tamtam / @ramtamtamtam

06/17/2016 at 02:30PM

22
#409 - Adrien Fabre / @statox42

07/11/2016 at 01:42PM

22
#410 - Sarang Khim / @sarang_khim

08/02/2016 at 05:30AM

22
#411 - George Angelopoulos / @g_usermod

08/04/2016 at 07:33PM

22
#412 - Bendik Samseth / @BSamseth

09/19/2016 at 09:10PM

22
#413 - Søren / @natlampen

09/20/2016 at 04:22PM

22
#414 - Bill Ruddock / @biinari

10/25/2016 at 05:20AM

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

02/14/2017 at 01:36PM

22
#416 - squdle / @squdle

06/24/2017 at 10:17AM

22
#417 - Brian Hall / @_bruab_

10/24/2017 at 02:26PM

22
#418 - Benoit Mortgat / @Benoit_Mortgat

11/14/2017 at 07:39AM

22
#419 - Austin Ware / @AustinWare17

03/12/2018 at 07:58PM

22
#420 - Dax / @zacoxi

11/20/2018 at 03:24AM