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):
20
#361 - Daisuke Ito / @itodais

08/26/2019 at 02:58PM

21
#362 - Benoit Benoit / @Benoit_Tgt

05/12/2016 at 07:59AM

21
#363 - Juho Härme / @jharme

05/13/2016 at 07:58PM

21
#364 - Samuel Walladge / @srwalladge

05/14/2016 at 05:27AM

21
#365 - よっぴぃ / @yoppynmhs

05/18/2016 at 06:14AM

21
#366 - arrtchiu / @arrtchiu

05/20/2016 at 08:51AM

21
#367 - Amit Shah / @Amwam

05/22/2016 at 04:07PM

21
#368 - Joseph An / @an_joseph

05/22/2016 at 10:53PM

21
#369 - Michael Cramer / @mlcramer

05/24/2016 at 09:58AM

21
#370 - Zhao Bin / @ZhaoBin2

06/07/2016 at 03:37PM

21
#371 - eyci ye / @eyciye

06/08/2016 at 02:34AM

21
#372 - WhatDo / @WhatDo10

06/16/2016 at 12:16PM

21
#373 - Sanjay / @patelsan

06/19/2016 at 03:45PM

21
#374 - frobozz / @Frobozzzz

06/25/2016 at 02:32PM

21
#375 - Laurion Burchall / @laurionb

06/28/2016 at 11:22PM

21
#376 - Robert Newbould / @c0nspiracy

06/29/2016 at 04:15PM

21
#377 - Alejandro Claro / @alejandroclaro

07/09/2016 at 06:48PM

21
#378 - Charles Qian / @aWarmWalrus

07/12/2016 at 10:14PM

21
#379 - Anton Pidkuiko / @pidkuiko

07/14/2016 at 08:37AM

21
#380 - Christopher Fujino / @chrisfujino

07/17/2016 at 01:18AM

21
#381 - Alan Richards / @alarobric

07/17/2016 at 05:11AM

21
#382 - André Peric Tavares / @andre_peric

07/19/2016 at 06:15PM

21
#383 - Steven Moazami / @mong8se

07/19/2016 at 08:53PM

21
#384 - Roland Hougs / @OminousWater

07/24/2016 at 08:52PM

21
#385 - Matt Clement / @zetaspartan2552

07/31/2016 at 12:07AM

21
#386 - Stoyko Stanchev / @stoykostanchev

08/07/2016 at 08:26PM

21
#387 - Josh Samuelson / @JoshSamuelson

08/10/2016 at 02:04AM

21
#388 - kodemaan / @kodemaan

08/12/2016 at 07:18PM

21
#389 - Antoni Villalonga / @friki

08/15/2016 at 10:51AM

21
#390 - Nik Sun / @CandySunPlus

08/16/2016 at 06:37AM