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):
29
#511 - John Newbery / @jonnynewbs

11/15/2016 at 10:01AM

29
#512 - Chris Snyder / @crsWorldCitizen

04/14/2017 at 08:24PM

29
#513 - Michael Sorhaindo / @pmsorhaindo

04/19/2017 at 11:50AM

30
#514 - Miki Tebeka / @tebeka

05/13/2016 at 04:23AM

30
#515 - Lieuwe Rooijakkers / @LieuweR

06/05/2016 at 09:10AM

30
#516 - Putente / @Putente_

09/10/2016 at 04:09AM

30
#517 - Loreno Heer / @LorenoHeer

11/07/2017 at 02:34PM

30
#518 - Bennett / @bennettbackward

12/19/2018 at 11:26AM

31
#519 - karcaw / @karcaw

09/02/2016 at 11:40PM

32
#520 - linealloop / @linealloop

05/18/2017 at 11:29PM

32
#521 - Jo / @Jo59893132

10/25/2018 at 06:15AM

33
#522 - 최종원 / @lastone9182

07/19/2018 at 10:53AM

34
#523 - prince ducaca / @prince_du_caca

09/27/2018 at 11:08PM

35
#524 - Nicola Coretti / @NiCoRetti

05/29/2016 at 09:38AM

36
#525 - nieza / @lucaspta1

06/05/2016 at 03:21AM

36
#526 - Brandon Emery Craig / @iambcraig

08/03/2018 at 07:57PM

37
#527 - Ryan Coopersmith / @RyanCoopersmit1

06/04/2017 at 09:16PM

37
#528 - vimgolfacct / @vimgolfacct

07/08/2019 at 01:44AM

45
#529 - Luis Rodriguez / @luisthecoder

11/13/2018 at 03:44AM

48
#530 - tuyen / @tuyen66827418

11/28/2018 at 03:18PM

50
#531 - Jurica / @Jurica34581259

11/15/2018 at 01:29AM

70
#532 - Jakub Troszok / @zosoooo

06/20/2016 at 03:53PM

70
#533 - Samir Sadek / @netsamir

07/10/2016 at 06:16PM

80
#534 - Justin Sitarz / @justinsitarz

05/30/2019 at 02:43PM

89
#535 - Jinotega / @Jinotega3000

12/29/2016 at 08:54PM