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
#301 - eshel / @EshelBM

02/27/2020 at 04:15PM

18
#302 - countime / @countime1

03/12/2020 at 10:16AM

18
#303 - Harsh Raj / @harshraj22aug

04/06/2020 at 06:35PM

19
#304 - Jeff VanDyke / @jeffv_a216

05/13/2016 at 03:37AM

19
#305 - Daniel Allen Deutsch / @cmmn_nighthawk

05/17/2016 at 02:19PM

19
#306 - Sam Cristall / @sbcristall

05/26/2016 at 05:05PM

19
#307 - るー / @loupbita

06/04/2016 at 10:28AM

19
#308 - Alexandre Lion / @lnalx

06/04/2016 at 01:47PM

19
#309 - David Devecsery / @devecsery

06/07/2016 at 03:11PM

19
#310 - Sam / @CheshireSwift

06/09/2016 at 10:31AM

19
#311 - Mel / @Sprocklem

06/12/2016 at 07:48PM

19
#312 - Marc Capell / @marc_capell

06/13/2016 at 08:41AM

19
#313 - Marcin Katulski / @marcink79

06/14/2016 at 05:40AM

19
#314 - Buster K. Mejborn / @BusterKMejborn

06/16/2016 at 08:38PM

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

06/16/2016 at 10:23PM

19
#316 - Albertux / @_Albertux

06/20/2016 at 07:08AM

19
#317 - Avery Wilkening / @awilkening

06/24/2016 at 02:30PM

19
#318 - Oliver Christ / @0liverChrist

07/12/2016 at 09:37PM

19
#319 - jn / @j1357924

08/07/2016 at 02:35PM

19
#320 - Maxime Reis / @MaximeReis

08/11/2016 at 04:18PM

19
#321 - swarkEafs / @EafsSwark

08/13/2016 at 06:23PM

19
#322 - Will / @obiwan__k3n00bi

08/13/2016 at 10:00PM

19
#323 - AODQ / @AODQIG

08/20/2016 at 03:27PM

19
#324 - Izabel Jelenić / @IzabelJelenic

08/23/2016 at 03:00PM

19
#325 - Ashish Narasimham / @asheeshkabob

08/31/2016 at 02:26PM

19
#326 - Utkrisht Dhankar / @UtkrishtDhankar

09/07/2016 at 03:33PM

19
#327 - Simon Plantinga / @SimonPlantinga

10/30/2016 at 11:22AM

19
#328 - caplod / @caplod

03/24/2017 at 04:48PM

19
#329 - Acid One / @AcidOne2

05/04/2017 at 08:10AM

19
#330 - Codingpotato / @codingpotato

05/07/2017 at 09:29AM