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):
25
#481 - Michał Łowicki / @mlowicki

04/18/2019 at 01:48PM

25
#482 - Jack Mooney / @jmooney7

08/22/2019 at 08:33AM

26
#483 - Jon E. Eguiluz / @viroide

05/12/2016 at 02:55PM

26
#484 - Clémence / @Clemence_Neoxia

05/16/2016 at 05:36PM

26
#485 - Chamoda / @chamodac

06/24/2016 at 09:20AM

26
#486 - 王运 / @640138017

07/10/2016 at 04:13PM

26
#487 - Dan Madden / @guthran

07/14/2016 at 07:56PM

26
#488 - Rizart Dokollari / @rdokollari

09/15/2016 at 08:59AM

26
#489 - Koudougou / @OpenPatate

09/23/2016 at 03:01PM

26
#490 - Christoph F. Seelus / @cseelus

10/26/2016 at 04:07AM

26
#491 - Davis Fields / @i301585

11/04/2016 at 03:04AM

26
#492 - Yann / @yannstad

02/19/2017 at 09:23AM

26
#493 - Will Clardy / @quexxon

04/14/2017 at 08:12PM

26
#494 - Rob Smolinski / @scottymcribs

07/04/2017 at 08:15PM

26
#495 - ¬¬¬ ¬¬¬ / @WLq3KGhxohrCPl1

07/09/2018 at 04:17AM

26
#496 - JulianW / @JulianWgs

10/27/2018 at 03:48PM

26
#497 - Mihai / @mihaicristiant

12/03/2018 at 01:16PM

26
#498 - abgalphabet / @abgalphabet

01/22/2019 at 12:17PM

26
#499 - Kyle Safran / @kylesafran

01/22/2019 at 10:20PM

26
#500 - TimMcGuire / @mcguire

01/24/2019 at 06:31PM

26
#501 - Duke Du / @DukeDu2

03/29/2019 at 03:17AM

26
#502 - Gitsnik / @dracyrys

04/22/2019 at 12:49PM

26
#503 - Izaak van Dongen / @goedel_gang

04/28/2019 at 01:13AM

26
#504 - Christian / @paierlep

08/31/2019 at 09:03PM

27
#505 - hidnasio / @hidnasio

05/12/2016 at 12:27PM

27
#506 - Kenny Lau / @kkkennnny

05/29/2016 at 05:56PM

27
#507 - Harry Askham / @harryaskham

06/02/2016 at 01:19PM

27
#508 - Chris Tsanikidis / @cris_tsan

06/09/2016 at 01:52PM

27
#509 - Nessig / @Nessig5

12/18/2016 at 04:56AM

27
#510 - Matt Walsh / @wattmalsh

02/02/2017 at 10:55PM