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):
16
#211 - John Smith / @johns32768

06/17/2017 at 11:08AM

16
#212 - aselaIllayaparachchi / @asela38

08/25/2017 at 04:35AM

16
#213 - ɹǝsnɐɥsıʇnɹ uoɾ / @JonRutis

10/05/2017 at 02:56PM

16
#214 - Stephen Betts / @stephenbetts

10/12/2017 at 02:23PM

16
#215 - Arijus / @argshook

02/09/2018 at 08:56AM

16
#216 - 赤佐田奈葉 / @akasatanaha_

06/28/2018 at 05:20AM

16
#217 - yqu212 / @yqu212

07/27/2018 at 09:24AM

16
#218 - royer / @RoyerMoyer1

09/23/2018 at 04:50PM

16
#219 - Benjamin Kiesl / @BenjaminKiesl

10/16/2018 at 02:20PM

16
#220 - PJ Frazer / @pj_frazer

11/24/2018 at 08:00PM

16
#221 - chenqiqi / @chenqiqi13

03/13/2019 at 06:12AM

17
#222 - Dmitriy Olshevskiy / @olshevskiy_dv

05/12/2016 at 11:03AM

17
#223 - Adam Leach / @qazwsxal

05/12/2016 at 04:29PM

17
#224 - george iv / @geowa4

05/12/2016 at 05:31PM

17
#225 - J.C. Morrow / @fueledbyclif

05/13/2016 at 02:49AM

17
#226 - Ben Hill / @KaizenSoze70

05/13/2016 at 12:17PM

17
#227 - Lifepillar / @lifepillar

05/13/2016 at 07:28PM

17
#228 - Niru Maheswaranathan / @niru_m

05/15/2016 at 11:47PM

17
#229 - Jan Fiser / @dmmn082

05/17/2016 at 06:21PM

17
#230 - tuck cursed on rerB / @19emtuck

05/22/2016 at 11:46AM

17
#231 - Dom Williams / @DomWilliams0

05/24/2016 at 05:42PM

17
#232 - Eli Zucker / @EliZucker

06/04/2016 at 02:45AM

17
#233 - Calvin Atlan / @calvinatlan

06/04/2016 at 09:25PM

17
#234 - Tai Le Tien / @letientai299

06/09/2016 at 03:52PM

17
#235 - malet / @Malet

06/10/2016 at 10:56PM

17
#236 - Anoop Kumar / @anooplive

08/24/2016 at 02:58AM

17
#237 - Christophe Perrotin / @ChrisPerSurTwit

09/24/2016 at 04:34PM

17
#238 - Igor Czerwinski / @igoratron

10/23/2016 at 11:45AM

17
#239 - Matti Sairanen / @MattiSairanen

11/13/2016 at 07:14PM

17
#240 - chocolate / @chocola81394123

12/22/2016 at 09:56AM