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):
20
#331 - nixi3 / @Nixi3cc

09/05/2016 at 04:51AM

20
#332 - TweetDreams / @TweetMusicians

10/08/2016 at 09:39AM

20
#333 - Christian Rondeau / @c_rondeau

10/15/2016 at 05:13PM

20
#334 - Brian Phelps / @electronjunkie

10/23/2016 at 08:02PM

20
#335 - Daniel Teal / @coelestinian

10/27/2016 at 01:12PM

20
#336 - Patrick Sanan / @patricksanan

01/07/2017 at 02:10PM

20
#337 - Gurukandhamoorthi / @Gurukandhamoor1

07/10/2017 at 10:08AM

20
#338 - Rakesh P / @rakeshpgopal

04/30/2018 at 08:36AM

20
#339 - Bruce Adams / @bruceadams1054

10/08/2018 at 02:20PM

21
#340 - Benoit Tigeot / @Benoit_Tgt

05/12/2016 at 07:59AM

21
#341 - Juho Härme / @jharme

05/13/2016 at 07:58PM

21
#342 - Samuel Walladge / @srwalladge

05/14/2016 at 05:27AM

21
#343 - よっぴぃ / @yoppynmhs

05/18/2016 at 06:14AM

21
#344 - arrtchiu / @arrtchiu

05/20/2016 at 08:51AM

21
#345 - Amit Shah / @Amwam

05/22/2016 at 04:07PM

21
#346 - Joseph An / @an_joseph

05/22/2016 at 10:53PM

21
#347 - Michael Cramer / @mlcramer

05/24/2016 at 09:58AM

21
#348 - Zhao Bin / @ZhaoBin2

06/07/2016 at 03:37PM

21
#349 - eyci ye / @eyciye

06/08/2016 at 02:34AM

21
#350 - WhatDo / @WhatDo10

06/16/2016 at 12:16PM

21
#351 - Sanjay / @patelsan

06/19/2016 at 03:45PM

21
#352 - frobozz / @Frobozzzz

06/25/2016 at 02:32PM

21
#353 - Laurion Burchall / @laurionb

06/28/2016 at 11:22PM

21
#354 - Robert Newbould / @c0nspiracy

06/29/2016 at 04:15PM

21
#355 - Alejandro Claro / @alejandroclaro

07/09/2016 at 06:48PM

21
#356 - Charles Qian / @aWarmWalrus

07/12/2016 at 10:14PM

21
#357 - Anton Pidkuiko / @pidkuiko

07/14/2016 at 08:37AM

21
#358 - Christopher Fujino / @chrisfujino

07/17/2016 at 01:18AM

21
#359 - Alan Richards / @alarobric

07/17/2016 at 05:11AM

21
#360 - André Peric Tavares / @andre_peric

07/19/2016 at 06:15PM