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

526 active golfers, 1795 entries

Leaderboard (lowest score wins):
23
#421 - Jason Pleau / @JasonPleau

05/18/2016 at 02:20PM

23
#422 - 이선협 / @kciter

06/03/2016 at 07:32AM

23
#423 - Karel Vervaeke / @karel1980

06/17/2016 at 12:11PM

23
#424 - Kirill Sidenko / @KirillSidenko

06/19/2016 at 04:21AM

23
#425 - Ryan van Rensburg / @rdvr001

07/16/2016 at 07:44PM

23
#426 - Thongrapee / @kulaspa2

07/25/2016 at 05:03AM

23
#427 - Zach Bush / @zmbush

07/25/2016 at 06:22PM

23
#428 - Michael Brailsford / @brailsmt

08/16/2016 at 06:20PM

23
#429 - さよきみ / @MrIn1121

12/09/2016 at 04:02PM

23
#430 - Eric Bakan / @ericbakan

03/14/2017 at 11:55PM

23
#431 - Riz Joj / @rizjoj

04/03/2017 at 02:05AM

23
#432 - Florian Gauger / @FlorianGauger

06/03/2017 at 01:39AM

23
#433 - jirgn / @jirgn

09/24/2017 at 01:38PM

23
#434 - martin tourneboeuf / @martintournebo1

01/31/2018 at 09:39PM

23
#435 - ewalk153 / @ewalk153

04/01/2018 at 06:42PM

23
#436 - Kris Ezra / @kris_ezra

06/14/2018 at 05:17PM

23
#437 - Robin De Mol / @RobinDeMol

09/14/2018 at 09:54AM

23
#438 - serent / @serent

03/19/2019 at 07:48AM

24
#439 - Thomas Jefferson / @thom_je_ff_sn

05/26/2016 at 08:21PM

24
#440 - Jorge Hervás / @joh417

05/30/2016 at 06:43PM

24
#441 - Restroom Sounds / @RestroomSounds

08/04/2016 at 03:31PM

24
#442 - Zachary Neubert / @Mr_Saturn16347

03/10/2017 at 10:17PM

24
#443 - Daniel / @0x9ABC

08/15/2017 at 05:21PM

24
#444 - Paul Sonkoly / @Phaul

08/28/2017 at 10:15AM

24
#445 - Robert Max Williams / @MaxPhurich

09/11/2017 at 09:24PM

24
#446 - しぇぱっち / @shepabashi

10/21/2017 at 11:53PM

24
#447 - Alex Koch 👨‍🍳👨‍💻🌹 / @alex_w_k

04/05/2018 at 10:11PM

24
#448 - Manos Koutselakis / @koutselakis_m

05/05/2019 at 08:39PM

25
#449 - Matthew Gardner / @mattgardn

06/11/2016 at 03:24AM

25
#450 - Denys Zadorozhnyi / @greenden

06/13/2016 at 01:53PM