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

510 active golfers, 1739 entries

Leaderboard (lowest score wins):
18
#271 - Avimgolfer / @l718232

01/30/2017 at 04:12PM

18
#272 - John Wilson / @Login4anonymity

03/22/2017 at 04:14AM

18
#273 - drumstix576 / @drumstix576

05/02/2017 at 11:49AM

18
#274 - Clement Keirua / @clemkeirua

05/07/2017 at 01:03PM

18
#275 - Mike Marion / @mikejmarion

05/10/2017 at 11:04PM

18
#276 - Luke Bryant / @LukeBryant55

10/01/2017 at 09:40AM

18
#277 - Andrew Peterson / @FungalRaincloud

07/29/2018 at 09:59PM

18
#278 - bluemartian / @bluemartianz59

08/19/2018 at 11:27PM

18
#279 - Mateen Ulhaq / @sicariusnoctis

02/13/2019 at 06:52AM

19
#280 - Jeff VanDyke / @jeffv_a216

05/13/2016 at 03:37AM

19
#281 - Daniel Allen Deutsch / @cmmn_nighthawk

05/17/2016 at 02:19PM

19
#282 - Sam Cristall / @sbcristall

05/26/2016 at 05:05PM

19
#283 - るー / @loupbita

06/04/2016 at 10:28AM

19
#284 - Alexandre Lion / @lnalx

06/04/2016 at 01:47PM

19
#285 - David Devecsery / @devecsery

06/07/2016 at 03:11PM

19
#286 - Sam / @CheshireSwift

06/09/2016 at 10:31AM

19
#287 - Mel / @Sprocklem

06/12/2016 at 07:48PM

19
#288 - Marc Capell / @marc_capell

06/13/2016 at 08:41AM

19
#289 - Marcin Katulski / @marcink79

06/14/2016 at 05:40AM

19
#290 - Buster K. Mejborn / @BusterKMejborn

06/16/2016 at 08:38PM

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

06/16/2016 at 10:23PM

19
#292 - Albertux / @_Albertux

06/20/2016 at 07:08AM

19
#293 - Avery Wilkening / @awilkening

06/24/2016 at 02:30PM

19
#294 - Oliver Christ / @0liverChrist

07/12/2016 at 09:37PM

19
#295 - jn / @j1357924

08/07/2016 at 02:35PM

19
#296 - Maxime Reis / @MaximeReis

08/11/2016 at 04:18PM

19
#297 - swarkEafs / @EafsSwark

08/13/2016 at 06:23PM

19
#298 - Will / @obiwan__k3n00bi

08/13/2016 at 10:00PM

19
#299 - AODQ / @AODQIG

08/20/2016 at 03:27PM

19
#300 - Izabel Jelenić / @IzabelJelenic

08/23/2016 at 03:00PM