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):
26
#511 - Izaak van Dongen / @goedel_gang

04/28/2019 at 01:13AM

26
#512 - Christian / @paierlep

08/31/2019 at 09:03PM

26
#513 - Miko / @_m_ik_o_

10/06/2019 at 05:13PM

27
#514 - hidnasio / @hidnasio

05/12/2016 at 12:27PM

27
#515 - Kenny Lau / @kkkennnny

05/29/2016 at 05:56PM

27
#516 - Harry Askham / @harryaskham

06/02/2016 at 01:19PM

27
#517 - Chris Tsanikidis / @cris_tsan

06/09/2016 at 01:52PM

27
#518 - Nessig / @Nessig5

12/18/2016 at 04:56AM

27
#519 - Matt Walsh / @wattmalsh

02/02/2017 at 10:55PM

27
#520 - mass / @mass256

07/09/2018 at 06:35AM

27
#521 - Mark Watson / @mrkrwtsn

08/03/2018 at 08:04PM

27
#522 - daniel / @daniel31464605

09/10/2018 at 04:38PM

27
#523 - Patrick Lavin / @LavinComputes

02/05/2019 at 10:27PM

27
#524 - vimgolfer24271 / @vimgolfer24271

05/13/2019 at 09:18AM

27
#525 - Nick Yeow / @nickyeow

05/24/2019 at 02:22PM

27
#526 - José / @AngelGaldamez

08/28/2019 at 01:09AM

28
#527 - J. Cosa / @esoesotracosa

01/16/2017 at 12:18PM

28
#528 - Михаил Добров / @mSuGfwFz2ZNvv5b

07/10/2017 at 08:38PM

28
#529 - Shunichi Kanade / @shunkana

11/18/2018 at 08:07AM

28
#530 - majestic sloth / @SamLlama

08/13/2019 at 06:59AM

28
#531 - Charlie OConor / @charlieoconor

10/07/2019 at 06:26PM

29
#532 - RAM13 / @cbcvbcxvbcxvb

10/21/2016 at 03:59PM

29
#533 - John Newbery / @jonnynewbs

11/15/2016 at 10:01AM

29
#534 - Chris Snyder / @crsWorldCitizen

04/14/2017 at 08:24PM

29
#535 - Michael Sorhaindo / @pmsorhaindo

04/19/2017 at 11:50AM

29
#536 - Patrick S. / @Patst1005

08/08/2019 at 08:00PM

29
#537 - Chris Shorrock / @EbinFlow

08/18/2019 at 05:23PM

30
#538 - Miki Tebeka / @tebeka

05/13/2016 at 04:23AM

30
#539 - Lieuwe Rooijakkers / @LieuweR

06/05/2016 at 09:10AM

30
#540 - Putente / @Putente_

09/10/2016 at 04:09AM