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

622 active golfers, 2098 entries

Leaderboard (lowest score wins):
16
#211 - Andreas Anderbach / @anderbacha

03/20/2017 at 02:51PM

16
#212 - Solomon / @Trugbildjaeger

04/02/2017 at 09:28AM

16
#213 - Nicolás Alvarez / @nicoa_bb_ba_ar

04/25/2017 at 09:55PM

16
#214 - FC / @FC37138806

05/10/2017 at 11:23PM

16
#215 - Renee Zhu / @reneezhu1994

05/10/2017 at 11:27PM

16
#216 - thomas lo / @wagaiznogoud

05/11/2017 at 02:07PM

16
#217 - Anders Schramm / @AndersSchramm

05/24/2017 at 01:55PM

16
#218 - Ernesto Barros / @ernestobarros7

05/27/2017 at 10:26PM

16
#219 - John Smith / @johns32768

06/17/2017 at 11:08AM

16
#220 - aselaIllayaparachchi / @asela38

08/25/2017 at 04:35AM

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

10/05/2017 at 02:56PM

16
#222 - Stephen Betts / @stephenbetts

10/12/2017 at 02:23PM

16
#223 - Arijus / @argshook

02/09/2018 at 08:56AM

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

06/28/2018 at 05:20AM

16
#225 - yqu212 / @yqu212

07/27/2018 at 09:24AM

16
#226 - royer / @RoyerMoyer1

09/23/2018 at 04:50PM

16
#227 - Benjamin Kiesl / @BenjaminKiesl

10/16/2018 at 02:20PM

16
#228 - PJ Frazer / @pj_frazer

11/24/2018 at 08:00PM

16
#229 - chenqiqi / @chenqiqi13

03/13/2019 at 06:12AM

16
#230 - Jason Neylon / @jasonneylon

01/21/2020 at 08:22PM

16
#231 - nico S / @der_nico_93

01/30/2020 at 02:14PM

16
#232 - floyd / @floyd10086

03/19/2020 at 06:27AM

16
#233 - Ryan Nevius / @ryannevius

03/24/2020 at 06:03AM

16
#234 - chocolate / @chocola81394123

11/28/2020 at 05:25PM

17
#235 - Dmitriy Olshevskiy / @olshevskiy_dv

05/12/2016 at 11:03AM

17
#236 - Adam Leach / @qazwsxal

05/12/2016 at 04:29PM

17
#237 - george iv / @geowa4

05/12/2016 at 05:31PM

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

05/13/2016 at 02:49AM

17
#239 - Ben Hill / @KaizenSoze70

05/13/2016 at 12:17PM

17
#240 - Lifepillar / @lifepillar

05/13/2016 at 07:28PM