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

562 active golfers, 1916 entries

Leaderboard (lowest score wins):
18
#271 - Paul Roe / @ep_roe

08/25/2016 at 04:41PM

18
#272 - Daniel Bellenger / @DanielBellenger

09/25/2016 at 12:50AM

18
#273 - Tact Overflow / @muppling

09/29/2016 at 12:37PM

18
#274 - Mikael Saltzman / @MikaelSaltzman

10/08/2016 at 03:12PM

18
#275 - Chris Cummings / @mistahcummings

10/31/2016 at 12:15AM

18
#276 - Vojtěch Vobr / @vvobr

12/04/2016 at 02:23PM

18
#277 - Michał Dytko / @DytkoM

12/16/2016 at 01:29PM

18
#278 - Jake Utley / @jakeutley

12/29/2016 at 11:58PM

18
#279 - Hans Yelek / @hans_yelek

01/09/2017 at 05:59AM

18
#280 - Avimgolfer / @l718232

01/30/2017 at 04:12PM

18
#281 - John Wilson / @Login4anonymity

03/22/2017 at 04:14AM

18
#282 - drumstix576 / @drumstix576

05/02/2017 at 11:49AM

18
#283 - Clement Keirua / @clemkeirua

05/07/2017 at 01:03PM

18
#284 - Mike Marion / @mikejmarion

05/10/2017 at 11:04PM

18
#285 - Luke Bryant / @LukeBryant55

10/01/2017 at 09:40AM

18
#286 - Andrew Peterson / @FungalRaincloud

07/29/2018 at 09:59PM

18
#287 - bluemartian / @bluemartianz59

08/19/2018 at 11:27PM

18
#288 - Mateen Ulhaq / @sicariusnoctis

02/13/2019 at 06:52AM

18
#289 - james_bunch / @james_bunch

03/19/2019 at 07:24AM

18
#290 - Crystal L / @Cartsly

07/13/2019 at 10:26PM

19
#291 - Jeff VanDyke / @jeffv_a216

05/13/2016 at 03:37AM

19
#292 - Daniel Allen Deutsch / @cmmn_nighthawk

05/17/2016 at 02:19PM

19
#293 - Sam Cristall / @sbcristall

05/26/2016 at 05:05PM

19
#294 - るー / @loupbita

06/04/2016 at 10:28AM

19
#295 - Alexandre Lion / @lnalx

06/04/2016 at 01:47PM

19
#296 - David Devecsery / @devecsery

06/07/2016 at 03:11PM

19
#297 - Sam / @CheshireSwift

06/09/2016 at 10:31AM

19
#298 - Mel / @Sprocklem

06/12/2016 at 07:48PM

19
#299 - Marc Capell / @marc_capell

06/13/2016 at 08:41AM

19
#300 - Marcin Katulski / @marcink79

06/14/2016 at 05:40AM