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

608 active golfers, 2043 entries

Leaderboard (lowest score wins):
26
#541 - Miko / @_m_ik_o_

10/06/2019 at 05:13PM

26
#542 - Jonathan Jeffrey / @projjects

12/05/2019 at 05:47AM

26
#543 - skamgolf / @skamgolf

12/12/2019 at 03:21AM

26
#544 - stevan / @stevan76107116

03/06/2020 at 07:39PM

26
#545 - volandkit / @volandkit

04/22/2020 at 11:29PM

26
#546 - RockerZZY / @rocker_zzy

05/27/2020 at 01:44PM

26
#547 - Ed Leafe / @EdLeafe

06/29/2020 at 05:21PM

27
#548 - hidnasio / @hidnasio

05/12/2016 at 12:27PM

27
#549 - Kenny Lau / @kkkennnny

05/29/2016 at 05:56PM

27
#550 - Harry Askham / @harryaskham

06/02/2016 at 01:19PM

27
#551 - Chris Tsanikidis / @cris_tsan

06/09/2016 at 01:52PM

27
#552 - Nessig / @Nessig5

12/18/2016 at 04:56AM

27
#553 - Matt Walsh / @wattmalsh

02/02/2017 at 10:55PM

27
#554 - mass / @mass256

07/09/2018 at 06:35AM

27
#555 - Mark Watson / @mrkrwtsn

08/03/2018 at 08:04PM

27
#556 - daniel / @daniel31464605

09/10/2018 at 04:38PM

27
#557 - Patrick Lavin / @LavinComputes

02/05/2019 at 10:27PM

27
#558 - vimgolfer24271 / @vimgolfer24271

05/13/2019 at 09:18AM

27
#559 - Nick Yeow / @nickyeow

05/24/2019 at 02:22PM

27
#560 - José / @AngelGaldamez

08/28/2019 at 01:09AM

28
#561 - J. Cosa / @esoesotracosa

01/16/2017 at 12:18PM

28
#562 - Михаил Добров / @mSuGfwFz2ZNvv5b

07/10/2017 at 08:38PM

28
#563 - Shunichi Kanade / @shunkana

11/18/2018 at 08:07AM

28
#564 - majestic sloth / @SamLlama

08/13/2019 at 06:59AM

28
#565 - Charlie OConor / @charlieoconor

10/07/2019 at 06:26PM

28
#566 - Aaron / @_Lordofthevoid_

11/29/2019 at 05:20PM

28
#567 - Martin Kauppinen / @MartinKauppinen

08/16/2020 at 03:52PM

28
#568 - Anil Narayan / @AnilNarayan2013

10/18/2020 at 04:35PM

29
#569 - RAM13 / @cbcvbcxvbcxvb

10/21/2016 at 03:59PM

29
#570 - John Newbery / @jonnynewbs

11/15/2016 at 10:01AM