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 534 remaining solutions by signing in and submitting your own entry
#535 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

535 active golfers, 1826 entries

Leaderboard (lowest score wins):
22
#421 - ahm4711 / @ahm4711

03/07/2019 at 10:39PM

22
#422 - tenteke / @kuskus3

03/10/2019 at 02:47PM

22
#423 - Grant / @grant_7788

04/28/2019 at 03:18PM

22
#424 - albalitz / @_albalitz

06/05/2019 at 12:21PM

22
#425 - majo senf / @majo_senf

06/17/2019 at 11:06AM

23
#426 - Max Luzuriaga / @luzuriaga

05/14/2016 at 04:02AM

23
#427 - ba lázs / @sarosbazsi

05/15/2016 at 10:27AM

23
#428 - Jason Pleau / @JasonPleau

05/18/2016 at 02:20PM

23
#429 - 이선협 / @kciter

06/03/2016 at 07:32AM

23
#430 - Karel Vervaeke / @karel1980

06/17/2016 at 12:11PM

23
#431 - Kirill Sidenko / @KirillSidenko

06/19/2016 at 04:21AM

23
#432 - Ryan van Rensburg / @rdvr001

07/16/2016 at 07:44PM

23
#433 - Thongrapee / @kulaspa2

07/25/2016 at 05:03AM

23
#434 - Zach Bush / @zmbush

07/25/2016 at 06:22PM

23
#435 - Michael Brailsford / @brailsmt

08/16/2016 at 06:20PM

23
#436 - さよきみ / @MrIn1121

12/09/2016 at 04:02PM

23
#437 - Eric Bakan / @ericbakan

03/14/2017 at 11:55PM

23
#438 - Riz Joj / @rizjoj

04/03/2017 at 02:05AM

23
#439 - Florian Gauger / @FlorianGauger

06/03/2017 at 01:39AM

23
#440 - jirgn / @jirgn

09/24/2017 at 01:38PM

23
#441 - martin tourneboeuf / @martintournebo1

01/31/2018 at 09:39PM

23
#442 - ewalk153 / @ewalk153

04/01/2018 at 06:42PM

23
#443 - Kris Ezra / @kris_ezra

06/14/2018 at 05:17PM

23
#444 - Robin De Mol / @RobinDeMol

09/14/2018 at 09:54AM

23
#445 - serent / @serent

03/19/2019 at 07:48AM

24
#446 - Thomas Jefferson / @thom_je_ff_sn

05/26/2016 at 08:21PM

24
#447 - Jorge Hervás / @joh417

05/30/2016 at 06:43PM

24
#448 - Restroom Sounds / @RestroomSounds

08/04/2016 at 03:31PM

24
#449 - Zachary Neubert / @Mr_Saturn16347

03/10/2017 at 10:17PM

24
#450 - Daniel / @0x9ABC

08/15/2017 at 05:21PM