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):
18
#271 - Yanis KHORSI / @YanisKHORSI

06/17/2016 at 01:45PM

18
#272 - Lou Lin / @LouLinear

06/21/2016 at 07:34PM

18
#273 - Banos / @deep_spoon

06/30/2016 at 11:11AM

18
#274 - Matthieu avec deux T / @meschatt

07/01/2016 at 10:59AM

18
#275 - Leix b / @leix_b

07/07/2016 at 08:00PM

18
#276 - Imre Kerr / @imre_kerr

07/25/2016 at 11:53AM

18
#277 - Practical Wearables / @practwearables

08/01/2016 at 10:38AM

18
#278 - Herbert S. / @herbertshlong

08/03/2016 at 08:50PM

18
#279 - Marcin Radomski / @_dextero

08/05/2016 at 12:55PM

18
#280 - Ewoud Smeur / @Ewoud90

08/22/2016 at 09:10PM

18
#281 - Paul Roe / @ep_roe

08/25/2016 at 04:41PM

18
#282 - Daniel Bellenger / @DanielBellenger

09/25/2016 at 12:50AM

18
#283 - Tact Overflow / @muppling

09/29/2016 at 12:37PM

18
#284 - Mikael Saltzman / @MikaelSaltzman

10/08/2016 at 03:12PM

18
#285 - Chris Cummings / @mistahcummings

10/31/2016 at 12:15AM

18
#286 - Vojtěch Vobr / @vvobr

12/04/2016 at 02:23PM

18
#287 - Michał Dytko / @DytkoM

12/16/2016 at 01:29PM

18
#288 - Jake Utley / @jakeutley

12/29/2016 at 11:58PM

18
#289 - Hans Yelek / @hans_yelek

01/09/2017 at 05:59AM

18
#290 - Avimgolfer / @l718232

01/30/2017 at 04:12PM

18
#291 - John Wilson / @Login4anonymity

03/22/2017 at 04:14AM

18
#292 - drumstix576 / @drumstix576

05/02/2017 at 11:49AM

18
#293 - Clement Keirua / @clemkeirua

05/07/2017 at 01:03PM

18
#294 - Mike Marion / @mikejmarion

05/10/2017 at 11:04PM

18
#295 - Luke Bryant / @LukeBryant55

10/01/2017 at 09:40AM

18
#296 - Andrew Peterson / @FungalRaincloud

07/29/2018 at 09:59PM

18
#297 - bluemartian / @bluemartianz59

08/19/2018 at 11:27PM

18
#298 - Mateen Ulhaq / @sicariusnoctis

02/13/2019 at 06:52AM

18
#299 - james_bunch / @james_bunch

03/19/2019 at 07:24AM

18
#300 - Crystal L / @Cartsly

07/13/2019 at 10:26PM