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

495 active golfers, 1685 entries

Leaderboard (lowest score wins):
15
#91 - Chris Hampson / @ChrisHampsonGTD

10/15/2016 at 10:59AM

15
#92 - João Sousa Andrade / @thejoaosa

10/17/2016 at 11:06PM

15
#93 - Brian Mego / @Major251

10/18/2016 at 02:53AM

15
#94 - Whossname / @BuzzaTyson

10/22/2016 at 07:30AM

15
#95 - Jonathan Elliott / @jon__elliott

11/02/2016 at 12:10AM

15
#96 - Paulo H Baumann / @PauloBaumann

11/10/2016 at 11:33AM

15
#97 - timerella® / @timerella

11/16/2016 at 10:01PM

15
#98 - Alan Turing / @alantrng

11/28/2016 at 10:34PM

15
#99 - Shashwat Raghuvanshi / @Shashwat_sr123

12/18/2016 at 01:04PM

15
#100 - Saurav Mitra / @SauravMitra11

12/31/2016 at 10:14AM

15
#101 - leroy / @leroyalien

01/30/2017 at 06:45AM

15
#102 - Zhihong Liu / @pieapple03

02/03/2017 at 02:14AM

15
#103 - Vimgolf / @vimgolf987

03/01/2017 at 05:51AM

15
#104 - Russell Ball / @rtball2

03/09/2017 at 10:54PM

15
#105 - Nick Spoon / @be_the_spoon

03/11/2017 at 11:16AM

15
#106 - Alexander Bessonov / @nonsleepr

03/13/2017 at 06:17PM

15
#107 - Daniel / @Daniel00288663

03/17/2017 at 07:39AM

15
#108 - sijinyuan / @sijinyuan

04/06/2017 at 02:27AM

15
#109 - Danton Noriega / @dantonnoriega

04/21/2017 at 08:07AM

15
#110 - Jason Hooper 🇨🇦 / @jasonincanada

04/23/2017 at 12:32AM

15
#111 - 梧桐王子 / @WutongYujie

04/24/2017 at 04:01AM

15
#112 - Ionel Manolache / @namnoi38

04/26/2017 at 01:19PM

15
#113 - Allen | Wheels / @SRWheel5

05/03/2017 at 09:43PM

15
#114 - Remus Dalrymple / @bornintheflames

05/04/2017 at 10:10AM

15
#115 - Carl Egbert / @CarlOEgbert

06/09/2017 at 07:25PM

15
#116 - akanb / @GAkt6L6SlKhy8zA

06/28/2017 at 04:23AM

15
#117 - 杨洋 / @176795444

07/01/2017 at 09:25AM

15
#118 - Eric Bock / @ericbock

07/14/2017 at 06:41PM

15
#119 - huho / @huho_xu

08/02/2017 at 08:53PM

15
#120 - toddkoym / @toddkoym

08/09/2017 at 03:13AM