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):
22
#421 - Brian Hall / @_bruab_

10/24/2017 at 02:26PM

22
#422 - Benoit Mortgat / @Benoit_Mortgat

11/14/2017 at 07:39AM

22
#423 - Austin Ware / @AustinWare17

03/12/2018 at 07:58PM

22
#424 - Dax / @zacoxi

11/20/2018 at 03:24AM

22
#425 - ahm4711 / @ahm4711

03/07/2019 at 10:39PM

22
#426 - tenteke / @kuskus3

03/10/2019 at 02:47PM

22
#427 - Grant / @grant_7788

04/28/2019 at 03:18PM

22
#428 - albalitz / @_albalitz

06/05/2019 at 12:21PM

22
#429 - majo senf / @majo_senf

06/17/2019 at 11:06AM

22
#430 - Ivo Blöchliger / @aigledesalpes

08/04/2019 at 08:00PM

22
#431 - Adam Hartz / @awareofnow

08/31/2019 at 01:50AM

23
#432 - Max Luzuriaga / @luzuriaga

05/14/2016 at 04:02AM

23
#433 - ba lázs / @sarosbazsi

05/15/2016 at 10:27AM

23
#434 - Jason Pleau / @JasonPleau

05/18/2016 at 02:20PM

23
#435 - 이선협 / @kciter

06/03/2016 at 07:32AM

23
#436 - Karel Vervaeke / @karel1980

06/17/2016 at 12:11PM

23
#437 - Kirill Sidenko / @KirillSidenko

06/19/2016 at 04:21AM

23
#438 - Ryan van Rensburg / @rdvr001

07/16/2016 at 07:44PM

23
#439 - Thongrapee / @kulaspa2

07/25/2016 at 05:03AM

23
#440 - Zach Bush / @zmbush

07/25/2016 at 06:22PM

23
#441 - Michael Brailsford / @brailsmt

08/16/2016 at 06:20PM

23
#442 - さよきみ / @MrIn1121

12/09/2016 at 04:02PM

23
#443 - Eric Bakan / @ericbakan

03/14/2017 at 11:55PM

23
#444 - Riz Joj / @rizjoj

04/03/2017 at 02:05AM

23
#445 - Florian Gauger / @FlorianGauger

06/03/2017 at 01:39AM

23
#446 - jirgn / @jirgn

09/24/2017 at 01:38PM

23
#447 - martin tourneboeuf / @martintournebo1

01/31/2018 at 09:39PM

23
#448 - ewalk153 / @ewalk153

04/01/2018 at 06:42PM

23
#449 - Kris Ezra / @kris_ezra

06/14/2018 at 05:17PM

23
#450 - Robin De Mol / @RobinDeMol

09/14/2018 at 09:54AM