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):
27
#511 - mass / @mass256

07/09/2018 at 06:35AM

27
#512 - Mark Watson / @mrkrwtsn

08/03/2018 at 08:04PM

27
#513 - daniel / @daniel31464605

09/10/2018 at 04:38PM

27
#514 - Patrick Lavin / @LavinComputes

02/05/2019 at 10:27PM

27
#515 - vimgolfer24271 / @vimgolfer24271

05/13/2019 at 09:18AM

27
#516 - Nick Yeow / @nickyeow

05/24/2019 at 02:22PM

27
#517 - José / @AngelGaldamez

08/28/2019 at 01:09AM

28
#518 - J. Cosa / @esoesotracosa

01/16/2017 at 12:18PM

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

07/10/2017 at 08:38PM

28
#520 - Shunichi Kanade / @shunkana

11/18/2018 at 08:07AM

28
#521 - majestic sloth / @SamLlama

08/13/2019 at 06:59AM

29
#522 - RAM13 / @cbcvbcxvbcxvb

10/21/2016 at 03:59PM

29
#523 - John Newbery / @jonnynewbs

11/15/2016 at 10:01AM

29
#524 - Chris Snyder / @crsWorldCitizen

04/14/2017 at 08:24PM

29
#525 - Michael Sorhaindo / @pmsorhaindo

04/19/2017 at 11:50AM

29
#526 - Patrick S. / @Patst1005

08/08/2019 at 08:00PM

29
#527 - Chris Shorrock / @EbinFlow

08/18/2019 at 05:23PM

30
#528 - Miki Tebeka / @tebeka

05/13/2016 at 04:23AM

30
#529 - Lieuwe Rooijakkers / @LieuweR

06/05/2016 at 09:10AM

30
#530 - Putente / @Putente_

09/10/2016 at 04:09AM

30
#531 - Loreno Heer / @LorenoHeer

11/07/2017 at 02:34PM

30
#532 - Bennett / @bennettbackward

12/19/2018 at 11:26AM

31
#533 - karcaw / @karcaw

09/02/2016 at 11:40PM

32
#534 - linealloop / @linealloop

05/18/2017 at 11:29PM

32
#535 - Jo / @Jo59893132

10/25/2018 at 06:15AM

33
#536 - 최종원 / @lastone9182

07/19/2018 at 10:53AM

34
#537 - prince ducaca / @prince_du_caca

09/27/2018 at 11:08PM

35
#538 - Nicola Coretti / @NiCoRetti

05/29/2016 at 09:38AM

36
#539 - nieza / @lucaspta1

06/05/2016 at 03:21AM

36
#540 - Brandon Emery Craig / @iambcraig

08/03/2018 at 07:57PM