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 603 remaining solutions by signing in and submitting your own entry
#604 Rohan / @themathgeek13 - Score: 100 - 06/12/20 @ 01:40
<Down><Down><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Left><Left><Left>i<CR><BS><BS><BS><BS><BS>      <Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Left><BS>d<CR><BS><BS><BS><BS><BS>      <Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Left><CR><BS><BS><BS><BS><BS>      <Esc>:wq!<CR>

0 comments


Created by: @Benoit_Tgt

604 active golfers, 2025 entries

Leaderboard (lowest score wins):
21
#421 - TachyG / @Tachypsychique

01/29/2018 at 01:47PM

21
#422 - Chris Dean / @ChrisDe62379742

06/12/2018 at 02:21PM

21
#423 - Scott / @chil2

04/01/2019 at 07:42PM

21
#424 - alekfed / @alek_fed

04/15/2019 at 08:38AM

21
#425 - Jason Chen / @chezbgone

07/04/2019 at 07:34AM

21
#426 - Freddy Román / @frcepeda

11/25/2019 at 09:21PM

21
#427 - 薛浩滎 / @iTPChbTeI4ZW9s3

03/17/2020 at 07:28PM

21
#428 - Jason / @roosjason

04/28/2020 at 02:40AM

21
#429 - せいほう / @FICSQF

06/06/2020 at 12:07PM

22
#430 - Michael Donux / @foodtooth

05/30/2016 at 06:18AM

22
#431 - Matt Williamson / @mddubs

06/03/2016 at 05:08PM

22
#432 - 李超 / @lichaorodxx

06/10/2016 at 06:22PM

22
#433 - Ram Tamtam / @ramtamtamtam

06/17/2016 at 02:30PM

22
#434 - Adrien Fabre / @statox42

07/11/2016 at 01:42PM

22
#435 - Sarang Khim / @sarang_khim

08/02/2016 at 05:30AM

22
#436 - George Angelopoulos / @g_usermod

08/04/2016 at 07:33PM

22
#437 - Bendik Samseth / @BSamseth

09/19/2016 at 09:10PM

22
#438 - Søren / @natlampen

09/20/2016 at 04:22PM

22
#439 - Bill Ruddock / @biinari

10/25/2016 at 05:20AM

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

02/14/2017 at 01:36PM

22
#441 - squdle / @squdle

06/24/2017 at 10:17AM

22
#442 - Brian Hall / @_bruab_

10/24/2017 at 02:26PM

22
#443 - Benoit Mortgat / @Benoit_Mortgat

11/14/2017 at 07:39AM

22
#444 - Austin Ware / @AustinWare17

03/12/2018 at 07:58PM

22
#445 - Dax / @zacoxi

11/20/2018 at 03:24AM

22
#446 - ahm4711 / @ahm4711

03/07/2019 at 10:39PM

22
#447 - tenteke / @kuskus3

03/10/2019 at 02:47PM

22
#448 - Grant / @grant_7788

04/28/2019 at 03:18PM

22
#449 - albalitz / @_albalitz

06/05/2019 at 12:21PM

22
#450 - majo senf / @majo_senf

06/17/2019 at 11:06AM