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):
17
#241 - Vitaly Sinilin / @unterwulf

05/15/2019 at 02:49PM

18
#242 - Rob Ert / @robrunner888

05/12/2016 at 06:45PM

18
#243 - tPenguinLTG / @tpenguinltg

05/13/2016 at 01:45AM

18
#244 - Henry Dang / @henrydangchs

05/15/2016 at 01:00AM

18
#245 - Michael Limiero / @michaellimiero

05/15/2016 at 02:29AM

18
#246 - Peter Labus / @PeterLabus

05/15/2016 at 09:55PM

18
#247 - Kevin Hamer / @khamer

05/17/2016 at 07:52PM

18
#248 - Va bien te faire fou / @mplayer_vimgolf

05/19/2016 at 08:49AM

18
#249 - Praash / @Praashie

05/20/2016 at 10:20AM

18
#250 - Kris P Sherwin / @KrispyRamone

05/21/2016 at 06:04PM

18
#251 - Mike Grimes / @magrimes

05/24/2016 at 08:11PM

18
#252 - rantelo / @rantelo7

05/25/2016 at 10:40PM

18
#253 - anoniem / @asq123sadf

05/28/2016 at 12:20PM

18
#254 - Marshall Croes / @marshallcroes

06/07/2016 at 09:56PM

18
#255 - Noud Speijcken / @noudspeijcken

06/10/2016 at 11:03AM

18
#256 - dobrak / @htryrthytu

06/10/2016 at 09:09PM

18
#257 - Yanis KHORSI / @YanisKHORSI

06/17/2016 at 01:45PM

18
#258 - Lou Lin / @LouLinear

06/21/2016 at 07:34PM

18
#259 - Banos / @deep_spoon

06/30/2016 at 11:11AM

18
#260 - Matthieu avec deux T / @meschatt

07/01/2016 at 10:59AM

18
#261 - Leix b / @leix_b

07/07/2016 at 08:00PM

18
#262 - Imre Kerr / @imre_kerr

07/25/2016 at 11:53AM

18
#263 - Practical Wearables / @practwearables

08/01/2016 at 10:38AM

18
#264 - Herbert S. / @herbertshlong

08/03/2016 at 08:50PM

18
#265 - Marcin Radomski / @_dextero

08/05/2016 at 12:55PM

18
#266 - Ewoud Smeur / @Ewoud90

08/22/2016 at 09:10PM

18
#267 - Paul Roe / @ep_roe

08/25/2016 at 04:41PM

18
#268 - Daniel Bellenger / @DanielBellenger

09/25/2016 at 12:50AM

18
#269 - Tact Overflow / @muppling

09/29/2016 at 12:37PM

18
#270 - Mikael Saltzman / @MikaelSaltzman

10/08/2016 at 03:12PM