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

526 active golfers, 1795 entries

Leaderboard (lowest score wins):
18
#271 - Vojtěch Vobr / @vvobr

12/04/2016 at 02:23PM

18
#272 - Michał Dytko / @DytkoM

12/16/2016 at 01:29PM

18
#273 - Jake Utley / @jakeutley

12/29/2016 at 11:58PM

18
#274 - Hans Yelek / @hans_yelek

01/09/2017 at 05:59AM

18
#275 - Avimgolfer / @l718232

01/30/2017 at 04:12PM

18
#276 - John Wilson / @Login4anonymity

03/22/2017 at 04:14AM

18
#277 - drumstix576 / @drumstix576

05/02/2017 at 11:49AM

18
#278 - Clement Keirua / @clemkeirua

05/07/2017 at 01:03PM

18
#279 - Mike Marion / @mikejmarion

05/10/2017 at 11:04PM

18
#280 - Luke Bryant / @LukeBryant55

10/01/2017 at 09:40AM

18
#281 - Andrew Peterson / @FungalRaincloud

07/29/2018 at 09:59PM

18
#282 - bluemartian / @bluemartianz59

08/19/2018 at 11:27PM

18
#283 - Mateen Ulhaq / @sicariusnoctis

02/13/2019 at 06:52AM

18
#284 - james_bunch / @james_bunch

03/19/2019 at 07:24AM

19
#285 - Jeff VanDyke / @jeffv_a216

05/13/2016 at 03:37AM

19
#286 - Daniel Allen Deutsch / @cmmn_nighthawk

05/17/2016 at 02:19PM

19
#287 - Sam Cristall / @sbcristall

05/26/2016 at 05:05PM

19
#288 - るー / @loupbita

06/04/2016 at 10:28AM

19
#289 - Alexandre Lion / @lnalx

06/04/2016 at 01:47PM

19
#290 - David Devecsery / @devecsery

06/07/2016 at 03:11PM

19
#291 - Sam / @CheshireSwift

06/09/2016 at 10:31AM

19
#292 - Mel / @Sprocklem

06/12/2016 at 07:48PM

19
#293 - Marc Capell / @marc_capell

06/13/2016 at 08:41AM

19
#294 - Marcin Katulski / @marcink79

06/14/2016 at 05:40AM

19
#295 - Buster K. Mejborn / @BusterKMejborn

06/16/2016 at 08:38PM

19
#296 - Хавьерсито / @jerojasro

06/16/2016 at 10:23PM

19
#297 - Albertux / @_Albertux

06/20/2016 at 07:08AM

19
#298 - Avery Wilkening / @awilkening

06/24/2016 at 02:30PM

19
#299 - Oliver Christ / @0liverChrist

07/12/2016 at 09:37PM

19
#300 - jn / @j1357924

08/07/2016 at 02:35PM