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

634 active golfers, 2144 entries

Leaderboard (lowest score wins):
15
#1 - Urtica dioica / @udioica

05/12/2016 at 02:26PM

15
#2 - Saki Gw / @Sakigw

05/12/2016 at 03:19PM

15
#3 - Jon Krause / @jkrause314

05/12/2016 at 10:26PM

15
#4 - Louis Caruana / @louiecaruana

05/13/2016 at 04:34AM

15
#5 - Benjamin Schindler / @beschindler

05/14/2016 at 07:28AM

15
#6 - mebubo / @mebubo

05/14/2016 at 09:44AM

15
#7 - Majo / @majodurco

05/14/2016 at 09:18PM

15
#8 - Cyber / @CyberLeo

05/14/2016 at 10:46PM

15
#9 - kalq / @KamilKraszewski

05/14/2016 at 10:55PM

15
#10 - Minh Nguyen / @soyelmnd

05/15/2016 at 12:28AM

15
#11 - John Braxler / @braxler

05/15/2016 at 02:33PM

15
#12 - John Doe Sr. / @johndoe67890543

05/15/2016 at 09:01PM

15
#13 - Slawek Zachcial / @SlawekZachcial

05/17/2016 at 05:51AM

15
#14 - Smylers / @Smylers2

05/17/2016 at 12:21PM

15
#15 - Ilya Shakirov / @aelaau

05/17/2016 at 03:08PM

15
#16 - Kohei Oguchi / @ogch_v

05/18/2016 at 05:22AM

15
#17 - Tose / @Toseim

05/18/2016 at 06:10PM

15
#18 - Kamil Gryniewicz / @sieboje

05/19/2016 at 10:46AM

15
#19 - Petro Тrouq / @zulolosi

05/19/2016 at 10:12PM

15
#20 - Michal Sylwester / @msylw

05/20/2016 at 12:52AM

15
#21 - (,,꒪꒫꒪,,) / @sneer

05/22/2016 at 07:03AM

15
#22 - ナイスショット / @_nice__shot_

05/23/2016 at 02:17AM

15
#23 - Michael / @michael40226613

05/23/2016 at 04:33AM

15
#24 - Ikaraf Gmiv / @ikarafgmiv

05/23/2016 at 10:08AM

15
#25 - Thijs van den Anker / @thijsvdanker

05/23/2016 at 08:06PM

15
#26 - Gabriel Tailor / @gabriel_tailor

05/25/2016 at 06:47AM

15
#27 - Bart / @oneofmanybarts

05/25/2016 at 07:14AM

15
#28 - Justin Snopek / @JustinSnopek

05/25/2016 at 07:04PM

15
#29 - we’re going to need a bigger bot / @assaflavie

05/27/2016 at 04:19AM

15
#30 - YASUI Tsutomu / @yattom

05/27/2016 at 08:50AM