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

608 active golfers, 2043 entries

Leaderboard (lowest score wins):
22
#451 - majo senf / @majo_senf

06/17/2019 at 11:06AM

22
#452 - Ivo Blöchliger / @aigledesalpes

08/04/2019 at 08:00PM

22
#453 - Adam Hartz / @awareofnow

08/31/2019 at 01:50AM

22
#454 - Gregory Furter / @gfurter

10/25/2019 at 05:23PM

22
#455 - leo / @leo28356948

10/28/2019 at 10:20AM

22
#456 - Scott Smith / @Scottaino

01/03/2020 at 06:11PM

22
#457 - loupiot.veloce / @LoupiotVeloce

06/09/2020 at 09:48PM

22
#458 - Yannick / @Yannick88147038

06/13/2020 at 06:52PM

23
#459 - Max Luzuriaga / @luzuriaga

05/14/2016 at 04:02AM

23
#460 - ba lázs / @sarosbazsi

05/15/2016 at 10:27AM

23
#461 - Jason Pleau / @JasonPleau

05/18/2016 at 02:20PM

23
#462 - 이선협 / @kciter

06/03/2016 at 07:32AM

23
#463 - Karel Vervaeke / @karel1980

06/17/2016 at 12:11PM

23
#464 - Kirill Sidenko / @KirillSidenko

06/19/2016 at 04:21AM

23
#465 - Ryan van Rensburg / @rdvr001

07/16/2016 at 07:44PM

23
#466 - Thongrapee / @kulaspa2

07/25/2016 at 05:03AM

23
#467 - Zach Bush / @zmbush

07/25/2016 at 06:22PM

23
#468 - Michael Brailsford / @brailsmt

08/16/2016 at 06:20PM

23
#469 - さよきみ / @MrIn1121

12/09/2016 at 04:02PM

23
#470 - Eric Bakan / @ericbakan

03/14/2017 at 11:55PM

23
#471 - Riz Joj / @rizjoj

04/03/2017 at 02:05AM

23
#472 - Florian Gauger / @FlorianGauger

06/03/2017 at 01:39AM

23
#473 - jirgn / @jirgn

09/24/2017 at 01:38PM

23
#474 - martin tourneboeuf / @martintournebo1

01/31/2018 at 09:39PM

23
#475 - ewalk153 / @ewalk153

04/01/2018 at 06:42PM

23
#476 - Kris Ezra / @kris_ezra

06/14/2018 at 05:17PM

23
#477 - Robin De Mol / @RobinDeMol

09/14/2018 at 09:54AM

23
#478 - serent / @serent

03/19/2019 at 07:48AM

23
#479 - Isaak Meier / @IsaakMeier

08/15/2019 at 06:03PM

23
#480 - Vim Player / @PlayerVim

10/07/2019 at 08:51PM