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

604 active golfers, 2025 entries

Leaderboard (lowest score wins):
17
#241 - Calvin Atlan / @calvinatlan

06/04/2016 at 09:25PM

17
#242 - Tai Le Tien / @letientai299

06/09/2016 at 03:52PM

17
#243 - malet / @Malet

06/10/2016 at 10:56PM

17
#244 - Anoop Kumar / @anooplive

08/24/2016 at 02:58AM

17
#245 - Christophe Perrotin / @ChrisPerSurTwit

09/24/2016 at 04:34PM

17
#246 - Igor Czerwinski / @igoratron

10/23/2016 at 11:45AM

17
#247 - Matti Sairanen / @MattiSairanen

11/13/2016 at 07:14PM

17
#248 - chocolate / @chocola81394123

12/22/2016 at 09:56AM

17
#249 - Kyouma / @kyoumaJohn

05/19/2017 at 01:44PM

17
#250 - Дима / @dimkino

09/07/2017 at 04:42PM

17
#251 - mkl / @Hnr1zklc

10/24/2017 at 03:48PM

17
#252 - Vitaly Sinilin / @unterwulf

05/15/2019 at 02:49PM

17
#253 - Zach Ingbretsen / @ZIngbretsen

09/07/2019 at 06:20PM

17
#254 - Matt Drover / @mdrover25

03/02/2020 at 12:07AM

17
#255 - speisz / @speiszc

07/13/2020 at 09:56PM

18
#256 - Rob Ert / @robrunner888

05/12/2016 at 06:45PM

18
#257 - tPenguinLTG / @tpenguinltg

05/13/2016 at 01:45AM

18
#258 - Henry Dang / @henrydangchs

05/15/2016 at 01:00AM

18
#259 - Michael Limiero / @michaellimiero

05/15/2016 at 02:29AM

18
#260 - Peter Labus / @PeterLabus

05/15/2016 at 09:55PM

18
#261 - Kevin Hamer / @khamer

05/17/2016 at 07:52PM

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

05/19/2016 at 08:49AM

18
#263 - Praash / @Praashie

05/20/2016 at 10:20AM

18
#264 - Kris P Sherwin / @KrispyRamone

05/21/2016 at 06:04PM

18
#265 - Mike Grimes / @magrimes

05/24/2016 at 08:11PM

18
#266 - rantelo / @rantelo7

05/25/2016 at 10:40PM

18
#267 - anoniem / @asq123sadf

05/28/2016 at 12:20PM

18
#268 - Marshall Croes / @marshallcroes

06/07/2016 at 09:56PM

18
#269 - Noud Speijcken / @noudspeijcken

06/10/2016 at 11:03AM

18
#270 - dobrak / @htryrthytu

06/10/2016 at 09:09PM