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

535 active golfers, 1826 entries

Leaderboard (lowest score wins):
21
#361 - Michael Cramer / @mlcramer

05/24/2016 at 09:58AM

21
#362 - Zhao Bin / @ZhaoBin2

06/07/2016 at 03:37PM

21
#363 - eyci ye / @eyciye

06/08/2016 at 02:34AM

21
#364 - WhatDo / @WhatDo10

06/16/2016 at 12:16PM

21
#365 - Sanjay / @patelsan

06/19/2016 at 03:45PM

21
#366 - frobozz / @Frobozzzz

06/25/2016 at 02:32PM

21
#367 - Laurion Burchall / @laurionb

06/28/2016 at 11:22PM

21
#368 - Robert Newbould / @c0nspiracy

06/29/2016 at 04:15PM

21
#369 - Alejandro Claro / @alejandroclaro

07/09/2016 at 06:48PM

21
#370 - Charles Qian / @aWarmWalrus

07/12/2016 at 10:14PM

21
#371 - Anton Pidkuiko / @pidkuiko

07/14/2016 at 08:37AM

21
#372 - Christopher Fujino / @chrisfujino

07/17/2016 at 01:18AM

21
#373 - Alan Richards / @alarobric

07/17/2016 at 05:11AM

21
#374 - André Peric Tavares / @andre_peric

07/19/2016 at 06:15PM

21
#375 - Steven Moazami / @mong8se

07/19/2016 at 08:53PM

21
#376 - Roland Hougs / @OminousWater

07/24/2016 at 08:52PM

21
#377 - Matt Clement / @zetaspartan2552

07/31/2016 at 12:07AM

21
#378 - Stoyko Stanchev / @stoykostanchev

08/07/2016 at 08:26PM

21
#379 - Josh Samuelson / @JoshSamuelson

08/10/2016 at 02:04AM

21
#380 - kodemaan / @kodemaan

08/12/2016 at 07:18PM

21
#381 - Antoni Villalonga / @friki

08/15/2016 at 10:51AM

21
#382 - Nik Sun / @CandySunPlus

08/16/2016 at 06:37AM

21
#383 - Mort Rainey / @arch_midnight

08/18/2016 at 12:00AM

21
#384 - Alexander / @vlasyuk_a

09/06/2016 at 11:03AM

21
#385 - Constantine / @ConstantineHatz

09/12/2016 at 09:31PM

21
#386 - Andrew Jackson / @andrewj_nz

09/17/2016 at 08:01PM

21
#387 - Meriadec Pillet / @loomisBroom

09/27/2016 at 11:44AM

21
#388 - king_zorba / @StrangeZorba

09/28/2016 at 03:42PM

21
#389 - Netrisk Cool / @C00lt0

09/29/2016 at 06:16PM

21
#390 - Michael Hoffmann / @micha66545852

02/28/2017 at 03:28PM