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 372 remaining solutions by signing in and submitting your own entry
#373 maks kamnikar / maks_kamnikar - Score: 21 - 01/08/18 @ 14:34
2jt.a<CR><Esc>;.;.0<C-V>kkc  <Esc>ZZ

0 comments


#374 TachyG / Tachypsychique - Score: 21 - 01/29/18 @ 13:47
jjf.i<CR>  <Esc>;;i<CR><Esc>;;i<CR><Esc>ZZ

0 comments


#375 Chris Dean / ChrisDe62379742 - Score: 21 - 06/12/18 @ 14:21
jjf.i<CR>  <Esc>13la<CR><Esc>19l.ZZ

0 comments


#376 Michael Donux / foodtooth - Score: 22 - 05/30/16 @ 06:18
2j2wi<CR>  <Esc>qaf.;i<CR><Esc>q@aZZ

0 comments


#377 Matt Williamson / mddubs - Score: 22 - 06/03/16 @ 17:08
/\.<CR>i<CR><Esc>nn.nn.<C-V>kkI  <Esc>ZZ

0 comments


#378 李超 / lichaorodxx - Score: 22 - 06/10/16 @ 18:22
/\.<CR>i<CR>  <Esc>2ni<CR><Esc>2ni<CR><Esc>:x<CR>

0 comments


#379 Ram Tamtam / ramtamtamtam - Score: 22 - 06/17/16 @ 14:30
/\.<CR>i<CR><Esc>nn.nn.<C-V>kkI  <Esc>ZZ

0 comments


#380 Adrien Fabre / statox42 - Score: 22 - 07/11/16 @ 13:42
jjf.i<CR><Esc>;;.;;.<C-V>kkA  <Esc>ZZ

0 comments


#381 Sarang Khim / sarang_khim - Score: 22 - 08/02/16 @ 05:30
2jf.i<CR>  <Esc>lf.i<CR><Esc>f.f..ZZ

0 comments


#382 George Angelopoulos / g_usermod - Score: 22 - 08/04/16 @ 19:33
jjf.i<CR><Esc>;;.;;.<C-V>kkI  <Esc>ZZ

0 comments


#383 Bendik Samseth / BSamseth - Score: 22 - 09/19/16 @ 21:10
2jqqf.i<CR><Esc><<i  <Esc>lq2@qZZ

0 comments


#384 Søren / natlampen - Score: 22 - 09/20/16 @ 16:22
qq/\.<CR>i<CR><Esc>d05i <Esc>nq2@qZZ

0 comments


#385 Bill Ruddock / biinari - Score: 22 - 10/25/16 @ 05:20
Mf.i<CR><Esc>;;.;;.0<C-V>kkc  <Esc>ZZ

0 comments


#386 Cù Hữu Hoàng / Cuhuuhoang - Score: 22 - 02/14/17 @ 13:36
/\.<CR>i<CR><Esc>nn.nn.<C-V>kkI  <Esc>ZZ

0 comments


#387 squdle / squdle - Score: 22 - 06/24/17 @ 10:17
qq/\.<CR>i<CR><Esc>0i<Del>  <Esc>nq2@qZZ

0 comments


#388 Brian Hall / _bruab_ - Score: 22 - 10/24/17 @ 14:26
2jqqf.i<CR><Esc><<i  <Esc>lq2@qZZ

0 comments


#389 Benoit Mortgat / Benoit_Mortgat - Score: 22 - 11/14/17 @ 07:39
4Wf.i<CR><C-U>      <Esc>;;.;;.ZZ

0 comments


#390 Austin Ware / AustinWare17 - Score: 22 - 03/12/18 @ 19:58
2jqq/\.<CR>cgn<CR>  .<Esc>q2@qZZ

0 comments


#391 Max Luzuriaga / luzuriaga - Score: 23 - 05/14/16 @ 04:02
2jqqf.i<CR><Esc>lq2@q<C-V>kkI  <Esc>ZZ

0 comments


#392 ba lázs / sarosbazsi - Score: 23 - 05/15/16 @ 10:27
jjf.i<CR>  <Esc>f.;i<CR><Esc>f.;i<CR><Esc>ZZ

0 comments


#393 Jason Pleau / JasonPleau - Score: 23 - 05/18/16 @ 14:20
/\.<CR>i<CR>  <Esc>;;nni<CR><Esc>nni<CR><Esc>ZZ

0 comments


#394 이선협 / kciter - Score: 23 - 06/03/16 @ 07:32
2jf.i<CR>  <Esc>;;i<CR><Esc>2;i<CR><Esc>:wq<CR>

0 comments


#395 Karel Vervaeke / karel1980 - Score: 23 - 06/17/16 @ 12:11
Mf.i<CR>  <Esc>fdl.hxxf)li<CR><Esc>ZZ

0 comments


#396 Kirill Sidenko / KirillSidenko - Score: 23 - 06/19/16 @ 04:21
/\.<CR>i<CR>  <Esc>2ni<CR><Esc>2ni<CR><Esc>:wq<CR>

0 comments


#397 Ryan van Rensburg / rdvr001 - Score: 23 - 07/16/16 @ 19:44
3Gqaf.i<CR><Esc>lq2@a<C-V>kkI  <Esc>ZZ

0 comments


#398 Thongrapee / kulaspa2 - Score: 23 - 07/25/16 @ 05:03
2jf.i<CR>  <Esc>;;i<CR><Esc>;;i<CR><Esc>:wq<CR>

0 comments


#399 Zach Bush / zmbush - Score: 23 - 07/25/16 @ 18:22
/(*<BS><CR>nqaF.i<CR>  <Esc>k$q2@aZZ

0 comments


#400 Michael Brailsford / brailsmt - Score: 23 - 08/16/16 @ 18:20
/\.<CR>i<CR>  <Esc>nni<CR><Esc>nni<CR><Esc>:wq<CR>

0 comments


#401 さよきみ / MrIn1121 - Score: 23 - 12/09/16 @ 16:02
/\.<CR>i<CR>  <Esc>2f.i<CR><Esc>2f.i<CR><Esc>ZZ

0 comments


#402 Eric Bakan / ericbakan - Score: 23 - 03/14/17 @ 23:55
/\.<CR>i<CR><Esc>nn.nn.0<C-V>kkc  <Esc>ZZ

0 comments


#403 Riz Joj / rizjoj - Score: 23 - 04/03/17 @ 02:05
jjf.i<CR>  <Esc>2f.i<CR><Esc>wf.i<CR><Esc>ZZ

0 comments


#404 Florian Gauger / FlorianGauger - Score: 23 - 06/03/17 @ 01:39
/\.<CR>i<CR><Right><Esc>n.nn.<C-V>2kc   <Esc>ZZ

0 comments


#405 jirgn / jirgn - Score: 23 - 09/24/17 @ 13:38
3Gf.i<CR><Esc>;;.;;.0<C-V>kkc  <Esc>ZZ

0 comments


#406 martin tourneboeuf / martintournebo1 - Score: 23 - 01/31/18 @ 21:39
Mt.a<CR><Esc>;.;.0<C-V>kkxgvI  <Esc>ZZ

0 comments


#407 ewalk153 / ewalk153 - Score: 23 - 04/01/18 @ 18:42
/\.<CR>qqi<CR><Esc><<i  <Esc>nnq2@qZZ

0 comments


#408 Kris Ezra / kris_ezra - Score: 23 - 06/14/18 @ 17:17
2jqqf.r<CR>q2@ql<C-V>2kI  .<Esc>ZZ

0 comments


#409 Thomas Jefferson / thom_je_ff_sn - Score: 24 - 05/26/16 @ 20:21
qa/\.<CR>i<CR>  <Esc>llq@a@aVk=:x<CR>

0 comments


#410 Jorge Hervás / joh417 - Score: 24 - 05/30/16 @ 18:43
/\.<CR>cgn<CR><Esc>.. <C-V>kkI  .<Esc>:wq<CR>

0 comments


#411 Restroom Sounds / RestroomSounds - Score: 24 - 08/04/16 @ 15:31
jjqqf.i<CR><Esc>lq2@q2I <Esc>k.k.ZZ

0 comments


#412 Zachary Neubert / Mr_Saturn16347 - Score: 24 - 03/10/17 @ 22:17
2jf.i<CR>  <Esc>f.f.i<CR><Esc>lf.i<CR><Esc>ZZ

0 comments


#413 Daniel / 0x9ABC - Score: 24 - 08/15/17 @ 17:21
2jqqf.i<CR><Esc>;q2@q0<C-V>2kc  <Esc>ZZ

0 comments


#414 Paul Sonkoly / Phaul - Score: 24 - 08/28/17 @ 10:15
2j<Esc>f.i<CR><Esc>;;.;;.0<C-V>2kc  <Esc>ZZ

0 comments


#415 Robert Max Williams / MaxPhurich - Score: 24 - 09/11/17 @ 21:24
2jqaf.i<CR><Esc><<i  <Esc>wwq@a@aZZ

0 comments


#416 しぇぱっち / shepabashi - Score: 24 - 10/21/17 @ 23:53
2jqqf.i<CR><C-D><BS>      <Right><Esc>q2@qZZ

0 comments


#417 Alex Koch :wq 🤯 / alex_w_k - Score: 24 - 04/05/18 @ 22:11
Mgf.f.i<CR><Esc>;;.;;.<C-V>kkI  <Esc>ZZ

0 comments


#418 Matthew Gardner / mattgardn - Score: 25 - 06/11/16 @ 03:24
3Gwi<CR>  <Esc>/\.<CR>ni<CR><Esc>nni<CR><Esc>:wq<CR>

0 comments


#419 Denys Zadorozhnyi / greenden - Score: 25 - 06/13/16 @ 13:53
/\.<CR>i<CR>  <Esc>wwwi<CR><Esc>wwwwwa<CR><Esc>ZZ

0 comments


#420 PeterGC / petkusGC - Score: 25 - 07/17/16 @ 18:13
3Gf.i<CR><Esc>;;.;;.i  <Esc>k.kh.:x<CR>

0 comments


#421 Meninx / _Meninx_ - Score: 25 - 07/30/16 @ 16:52
jjf.i<CR>  <Esc>2lqqf.y r<CR>pq@qZZ

0 comments


#422 Marcel Akkerman / MarcelAkkerman - Score: 25 - 12/21/16 @ 14:16
jjt.a<CR><BS><BS><BS><BS><BS>      <Esc>;.;.<Esc>ZZ

0 comments


#423 Paul Inc / hiniol1982 - Score: 25 - 07/13/17 @ 15:46
:3<CR>f.i<CR><Esc>lf..lf..<C-V>kkI  <Esc>ZZ

0 comments


#424 Ron Alexssen / Ralexhere - Score: 25 - 10/16/17 @ 23:19
/.<CR>\/\.<CR>i<CR>  <Esc>nni<CR><Esc>nni<CR><Esc>ZZ

0 comments


#425 Carl Ward / doncarlos999 - Score: 25 - 11/17/17 @ 05:36
:%s/\.[^m]/\r      &/g<CR>ZZ

0 comments


#426 Elias Åström / ryvnfn - Score: 25 - 12/27/17 @ 00:57
:se sw=2<CR>Mwqqi<CR><Esc>2f.q2@qZZ

0 comments


#427 Spacesh1p / spacesh1pdev - Score: 25 - 01/19/18 @ 10:06
:%s/\.[^m]/\r      &/g<CR>ZZ

0 comments


#428 Daniel de Vries / devries_d - Score: 25 - 02/07/18 @ 16:29
2jf.i<CR>  l<BS><Esc>lqqf.i<CR><Esc><Right>q@qZZ

0 comments


#429 Tim / timothyscosta - Score: 25 - 04/02/18 @ 15:33
Mf.i<CR><Esc>;;.;;.Vkk<<C-V>jjI  <Esc>ZZ

0 comments


#430 Jon E. Eguiluz / viroide - Score: 26 - 05/12/16 @ 14:55
:%s/\./\r      ./gc<CR>yyy<Esc>ZZ

0 comments


#431 Clémence / Clemence_Neoxia - Score: 26 - 05/16/16 @ 17:36
/\.<CR>i<CR><Esc>nni<CR><Esc>nni<CR><Esc><C-V>kkI  <Esc>ZZ

0 comments


#432 Chamoda / chamodac - Score: 26 - 06/24/16 @ 09:20
2j10la<CR>  <Esc>13la<CR><Esc>19la<CR><Esc>:wq<CR>

0 comments


#433 王运 / 640138017 - Score: 26 - 07/10/16 @ 16:13
2jqqf.i<CR><Esc>d0i     <Esc>f_q2@qZZ

0 comments


#434 Dan Madden / guthran - Score: 26 - 07/14/16 @ 19:56
:%s/\./\r      ./gc<CR>yyy<Esc>ZZ

0 comments


#435 Rizart Dokollari / rdokollari - Score: 26 - 09/15/16 @ 08:59
:%s/\./\r      ./gc<CR>yyy<Esc>ZZ

0 comments


#436 Koudougou / OpenPatate - Score: 26 - 09/23/16 @ 15:01
:%s/\./\r      ./gc<CR>yyyqZZ

0 comments


#437 Christoph F. Seelus / cseelus - Score: 26 - 10/26/16 @ 04:07
2jqqf.i<CR><Esc>d0i     <Esc>f_q2@qZZ

0 comments


#438 Davis Fields / i301585 - Score: 26 - 11/04/16 @ 03:04
2jqqf.i<CR><Esc>d0i     <Esc>f_q2@qZZ

0 comments


#439 Yann / yannstadnicki - Score: 26 - 02/19/17 @ 09:23
:%s/\./\r      ./gc<CR>yyy<Esc>ZZ

0 comments


#440 Will Clardy / quexxon - Score: 26 - 04/14/17 @ 20:12
3Gf.i<CR><Esc>;;.;;.Vkk<<C-V>jjI  <Esc>ZZ

0 comments


#441 Rob Smolinski / scottymcribs - Score: 26 - 07/04/17 @ 20:15
:3s/\./\r      ./gc<CR>yyyqZZ

0 comments


#442 hidnasio / hidnasio - Score: 27 - 05/12/16 @ 12:27
:%s/\./\r      ./gc<CR>yyynnZZ

0 comments


#443 Kenny Lau / kkkennnny - Score: 27 - 05/29/16 @ 17:56
3Gqqf.i<CR><Esc>lq2@q:%s/\./  .<CR>ZZ

0 comments


#444 Harry Askham / harryaskham - Score: 27 - 06/02/16 @ 13:19
:%s/\./\r      \./gc<CR>yyyqZZ

0 comments


#445 Chris Tsanikidis / cris_tsan - Score: 27 - 06/09/16 @ 13:52
2j:s/\./\r      &/cg<CR>yyyqZZ

0 comments


#446 Nessig / Nessig5 - Score: 27 - 12/18/16 @ 04:56
:%s/\./\r\./gc<CR>yyl<C-V>2k6I <Esc>ZZ

0 comments


#447 Matt Walsh / wattmalsh - Score: 27 - 02/02/17 @ 22:55
:%s/\./\r      \./gc<CR>yyyqZZ

0 comments


#448 J. Cosa / esoesotracosa - Score: 28 - 01/16/17 @ 12:18
:%s/\./\r      \./g<CR>kJxkJxZZ

0 comments


#449 Михаил Добров / mSuGfwFz2ZNvv5b - Score: 28 - 07/10/17 @ 20:38
Mt.a<CR><Esc>;.;.Vkk3<<C-V>jjI      <Esc>ZZ

0 comments


#450 RAM13 / cbcvbcxvbcxvb - Score: 29 - 10/21/16 @ 15:59
/\.<CR>qqi<CR>  q<BS><Esc>ni<CR><Esc>uwni<CR><Esc>nn.:x<CR>

0 comments


#451 John Newbery / jonnynewbs - Score: 29 - 11/15/16 @ 10:01
:%s/\./\r      ./gc<CR>yyy{{<Esc><Esc>ZZ

0 comments


#452 Chris Snyder / crsWorldCitizen - Score: 29 - 04/14/17 @ 20:24
2jf.i<CR><Esc>;;.;;.V<Up><Up><<C-V><Down><Down>I  <Esc>:wq!<CR>

0 comments


#453 Michael Sorhaindo / pmsorhaindo - Score: 29 - 04/19/17 @ 11:50
\/\.<CR>i<CR>  <Esc>wwwi<CR>t<BS><Esc>f.ni<CR><Esc><Esc>:wq<CR>

0 comments


#454 Miki Tebeka / tebeka - Score: 30 - 05/13/16 @ 04:23
:%s/\./\r      \./gc<CR>yyynn:wq<CR>

0 comments


#455 Lieuwe Rooijakkers / LieuweR - Score: 30 - 06/05/16 @ 09:10
jjf.i<CR><Esc>2f.i<CR><Esc>2f.i<CR><Esc><C-V>kkI  <Esc>:wq<CR>

0 comments


#456 Putente / Putente_ - Score: 30 - 09/10/16 @ 04:09
:%s/\(\.[^m]\)/\r      \1/g<CR>ZZ

0 comments


#457 Loreno Heer / LorenoHeer - Score: 30 - 11/07/17 @ 14:34
6w<Left>i<CR><Tab><BS>  <Esc>2w2w<Left>i<CR><Esc>3www<Right>i<CR><Esc>:wq<CR>

0 comments


#458 karcaw / karcaw - Score: 31 - 09/02/16 @ 23:40
:%s/\.\([^m]\)/<C-V><CR>      .\1/g<CR>ZZ

0 comments


#459 linealloop / linealloop - Score: 32 - 05/18/17 @ 23:29
2jf.i<CR><Esc>2f..2f..Vkk<<C-V>jjI  <Esc>:w<CR>:q<CR>

0 comments


#460 Nicola Coretti / NiCoRetti - Score: 35 - 05/29/16 @ 09:38
3Gf.i<CR><Tab><BS>  jk<BS><BS><Esc>f.f.i<CR>j<BS><Esc>f.f.i<CR><Esc>:wq<CR>

0 comments


#461 nieza / lucaspta1 - Score: 36 - 06/05/16 @ 03:21
jjg.i<Esc>f.i<CR><BS><BS><BS><BS>      <Esc>2;i<CR><Esc>2;i<CR><Esc>;:wq<CR>

0 comments


#462 Ryan Coopersmith / RyanCoopersmit1 - Score: 37 - 06/04/17 @ 21:16
jjf.i<CR><Esc>0xi  <Esc>;;i<CR><Esc>0xi  <Esc>;;i<CR><Esc>0xi  <Esc>ZZ

0 comments


#463 Jakub Troszok / zosoooo - Score: 70 - 06/20/16 @ 15:53
jjllllllllllli<CR><Tab><BS>  <Esc>:w<CR>lllllllllllllli<CR><Esc><Esc>lllllllllllllllllllli<CR><Esc>:w<CR>:q<CR>

0 comments


#464 Samir Sadek / netsamir - Score: 70 - 07/10/16 @ 18:16
/\v()<Left>\.\w+()?<Left><Left><Left><Right>|<BS>\9<BS>(\)<Left><Left>[\)}<BS>]+<CR>/<Up><Left><Left><Left><Left><Left><Left><Left><Left><Left>^<CR>:s//\r      \!<BS>1/g<CR>ZZ

0 comments


#465 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

465 active golfers, 1593 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 - Assaf Lavie / AssafLavie

05/27/2016 at 04:19AM

15
#30 - YASUI Tsutomu / yattom

05/27/2016 at 08:50AM