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 59a2167bd6550c0006000005

multiple cursor alternative

from: https://www.reddit.com/r/vim/comments/6w5pfa/crosspost_from_remacs_how_would_you_do_this_in_vim/

Start file
<section class="top-bar-selection">
  <ul class="left">
    <li class="divider"></li>
    <li class="active">
      <a href="homepage.html">Page 1</a></li>
    <li class="divider"></li>
    <li>
      <a href="homepage.html">Page 2</a></li>
    <li class="divider"></li>
    <li>
      <a href="homepage.html">Page 3</a></li>
    <li class="divider"></li>
    <li>
      <a href="homepage.html">Page 4</a></li>
  </ul>
</section>
End file
<section class="top-bar-selection">
  <ul class="left">
    <li class="divider"></li>
    <li class="active">
      <a href="Page1.html">Page 1</a></li>
    <li class="divider"></li>
    <li>
      <a href="Page2.html">Page 2</a></li>
    <li class="divider"></li>
    <li>
      <a href="Page3.html">Page 3</a></li>
    <li class="divider"></li>
    <li>
      <a href="Page4.html">Page 4</a></li>
  </ul>
</section>

View Diff

5c5
<       <a href="homepage.html">Page 1</a></li>
---
>       <a href="Page1.html">Page 1</a></li>
8c8
<       <a href="homepage.html">Page 2</a></li>
---
>       <a href="Page2.html">Page 2</a></li>
11c11
<       <a href="homepage.html">Page 3</a></li>
---
>       <a href="Page3.html">Page 3</a></li>
14c14
<       <a href="homepage.html">Page 4</a></li>
---
>       <a href="Page4.html">Page 4</a></li>

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 166 remaining solutions by signing in and submitting your own entry
#167 Paul Sonkoly / Phaul - Score: 24 - 12/09/17 @ 13:00
qq/P<CR>y2w4bcw<C-R>0<Esc>hxnq3@qZZ

0 comments


#168 Джабраил / Dzhabrik - Score: 24 - 01/03/18 @ 02:39
qq/P<CR>wvyF.PFpdb~jq3@q:x<CR>

0 comments


#169 danmakenoise / danmakenoise - Score: 24 - 03/17/18 @ 12:36
/Pa<CR>qqyit4bvephxnnq3@qZZ

0 comments


#170 Moritz Manner / moritz_manner - Score: 24 - 03/17/18 @ 19:29
qq/ho<CR>dwfPyt<F.Pdhq3@qZZ

0 comments


#171 서강훈 / shirano150 - Score: 24 - 04/05/18 @ 05:58
qq/P<CR>y2w4bcw<C-R>0<Esc>hxnq3@qZZ

0 comments


#172 Rachel Murray / RachelMurray11 - Score: 25 - 08/28/17 @ 11:02
/P<CR>qq2ywFebdw"0PXnnq3@qZZ

0 comments


#173 Jason Liang / summerjacketx - Score: 25 - 09/05/17 @ 05:19
qq/P<CR>yt<Foviwphxjq3@q:wq<CR>

0 comments


#174 Herr Joschka / HerrJoschka - Score: 25 - 10/19/17 @ 03:41
/P<CR>qqyt<F.db"0Phxnnq3@qZZ

0 comments


#175 Pfhor / PfhorShark - Score: 25 - 10/27/17 @ 22:34
qq/ho<CR>fPv5lyNvwhphxq3@qZZ

0 comments


#176 Ben Hill / KaizenSoze70 - Score: 25 - 12/04/17 @ 12:05
/P<CR>qq2yw4bcw<C-R>0<Esc>hxnnq3@qZZ

0 comments


#177 gerry / ggaonag - Score: 25 - 03/31/18 @ 17:15
<0xc2><0xbf>qq/P<CR>y2w4bviwphxjq3@qZZ

0 comments


#178 frank p / icedearth55 - Score: 25 - 05/12/18 @ 10:06
/P<CR>qqy2wF.PXFhdtPnnq3@qZZ

0 comments


#179 Kris Ezra / kris_ezra - Score: 25 - 06/14/18 @ 16:27
qq/ho<CR>dwfP2yw2T"Phxq3@qZZ

0 comments


#180 Joachim Nielandt / joachimnielandt - Score: 26 - 09/30/17 @ 18:58
qa/P<CR>yt<?ho<CR>vt.pX$q3@a:wq<CR>

0 comments


#181 Sebastian Korten / FlashKorten - Score: 26 - 10/28/17 @ 10:53
:g/P/norm fPwylF.PT"4x~<CR>ZZ

0 comments


#182 Mihai / mihaicristiant - Score: 26 - 11/10/17 @ 20:03
qr/page <CR>yitFevbPdhnq3@RZZ

0 comments


#183 Михаил Сурин / realssmike - Score: 26 - 12/17/17 @ 03:32
/ho<CR>qadwfPy6lbbhPhxnq3@aZZ

0 comments


#184 Aaron Williamson / TheFunkOverlord - Score: 26 - 03/21/18 @ 20:45
qa/ho<CR>t<ylNcePage<C-R>0<Esc>q3@aZZ

0 comments


#185 Dylan Nelson / dlnnlsn - Score: 26 - 06/08/18 @ 04:22
jqq3jfPyt<2F"phxldt.q3@qZZ

0 comments


#186 Charlie OConor / charlieoconor - Score: 27 - 09/20/17 @ 20:24
:%s/ho\l*/Page1<CR>3<C-A>3kr33k<C-A>ZZ

0 comments


#187 Bart Kleijngeld / BartKleijngeld - Score: 27 - 12/01/17 @ 11:38
qq/ho<CR>cwP<C-P>1<Esc>q@q<C-A>@q<C-A><C-A>@q<C-A><C-A><C-A>ZZ

0 comments


#188 Zach Starkebaum / rebelzach - Score: 27 - 03/03/18 @ 16:25
/ho<CR>qqnceP<C-P>2<Esc>q@q<C-A>@@r4@qr1ZZ

0 comments


#189 Yousef Mohamed / MohamedYoyo94 - Score: 28 - 02/23/18 @ 11:11
jqq3jtodt.fPyt<F.PhxF=q3@qZZ

0 comments


#190 Marc / Fusselgesicht - Score: 29 - 10/14/17 @ 22:23
:%s/ho\w*/Page1<CR>6k<C-A>3j<C-A><C-A>3j3<C-A>ZZ

0 comments


#191 梅干 / Umeboshi_9 - Score: 29 - 11/10/17 @ 15:47
:%s/ho\l*/Page1/g<CR>3<C-A>3k2<C-A>3k<C-A>ZZ

0 comments


#192 Benoit Mortgat / Benoit_Mortgat - Score: 29 - 11/13/17 @ 16:32
/h<C-G><CR>*cePage2<Esc>n.n.n.<C-X>6j<C-A>3jr4ZZ

0 comments


#193 Rodrigo Santa Cruz / rstcruzo - Score: 30 - 10/16/17 @ 04:09
/ho<CR>ciwPage1<Esc>qqyiwnviwp<C-A>q2@qZZ

0 comments


#194 David / Latiku - Score: 31 - 08/28/17 @ 19:49
:%s/homepage/Page1/<CR>3<C-A>3k2<C-A>3k<C-A>ZZ

0 comments


#195 Omar M. Ali / OmarMMAli - Score: 31 - 10/30/17 @ 21:04
:%s/homepage/Page1<CR>3<C-A>3k2<C-A>3k1<C-A>ZZ

0 comments


#196 かりうむ / ka1l - Score: 32 - 11/15/17 @ 11:35
:%s/homepage/Page1/g<CR>3<C-A>3k2<C-A>3k<C-A>ZZ

0 comments


#197 Veljko Dimic / v2dimic - Score: 33 - 02/06/18 @ 22:44
qq/ho<CR>cwPage1<Esc>q3@q3<C-A>?1<CR>2<C-A>/1<CR>nn<C-A>ZZ

0 comments


#198 Ítalo Vieira / italogvieira - Score: 34 - 09/11/17 @ 02:32
/ho.*"<CR>qqdgnly2whPhxa.html"<Esc>q3@qZZ

0 comments


#199 Chris Kirkland / numbahs - Score: 36 - 11/07/17 @ 04:06
:%s/homepage/Page1/<CR>8G<C-A>11Gf1r33jr4ZZ

0 comments


#200 l / ioio85 - Score: 36 - 02/06/18 @ 02:16
:%s/ho.*\(\..*\)\(\d\)/Page\2\1\2<CR>ZZ

0 comments


#201 Akin S / Akin_So - Score: 38 - 09/26/17 @ 22:45
5Gfh;:%s/<C-R><C-W>/Page1/g<CR>f1r43kr33kr23k:wq<CR>

0 comments


#202 Shawn Axsom / ShawnAxsom - Score: 39 - 08/27/17 @ 23:59
:%g/hr/norm fPyt<FohPF xfhdt.<CR>:q<CR>:w<CR>:q<CR>

0 comments


#203 Michael Heyman / michaelheyman - Score: 46 - 11/16/17 @ 02:33
:%s/homepage/Page/g<CR>f.i4<Esc>kkki3<Esc>kkki2<Esc>kkki1<Esc>:x<CR>

0 comments


#204 Jeff / RealJeffIrwin - Score: 54 - 09/26/17 @ 22:17
:%s/homepage/Page/g<CR>gg/Page<CR>wi1<Esc>nnwi2<Esc>nnwi3<Esc>nnwi4<Esc>:wq<CR>

0 comments


#205 Sebastian Aburto / saburto_m - Score: 54 - 10/01/17 @ 20:42
:let i=1 | g/homepage/s//\='Page'.i/ | let i=i+1<CR><Esc>:wq<CR>

0 comments


#206 Nome / sensorario - Score: 64 - 09/21/17 @ 16:55
:%s/home<Esc><Esc><Esc><Esc>5G0wwwww$<Esc>qq0$bbbbbvbybbbbviwpi<BS><Esc>qjjj@qjjj@@jjj@@<Esc>ZZ

0 comments


#207 William Burns / _william_burns - Score: 70 - 09/20/17 @ 19:21
/ho<CR><Esc>xxxxxiP<Right><Right><Right>1<Esc>/ho<CR><Esc>xxxxxiP<Right><Right><Right>2<Esc>/ho<CR>xxxxxiP<Right><Right><Right>3<Esc>/ho<CR><Esc>xxxxxiP<Right><Right><Right>4<Esc>:x<CR>

0 comments


#208 Daniel Rasmuson / danielrasmuson - Score: 85 - 09/06/17 @ 06:04
/home<CR>vi"xiPage1.html<Esc>jjjvi"xiPage2.html<Esc>jjjvi"xiPage3.html<Esc>jjjvi"xiPage5<BS>4.html<Esc>:wq<CR>

0 comments


Created by: wyne

208 active golfers, 708 entries

Leaderboard (lowest score wins):
19
#31 - Arthur van Rooijen / MuadDev

11/02/2017 at 04:08PM

19
#32 - Turkey Man / lvturkeyman

11/07/2017 at 04:36PM

19
#33 - OPChrom / OPChrom

11/09/2017 at 03:43PM

19
#34 - Juuso Valkeejärvi / jussovalk

11/10/2017 at 09:36PM

19
#35 - BobbyLapointe / BobbyLapointe7

11/13/2017 at 05:04PM

19
#36 - Gabriel Siqueira / Gabriel_HSiq

12/02/2017 at 10:50PM

19
#37 - Prithviraj Patil / dummyprithviraj

12/03/2017 at 02:20PM

19
#38 - 梧桐王子 / WutongYujie

12/05/2017 at 05:53AM

19
#39 - Pereant osores / viniciusxp

12/05/2017 at 05:31PM

19
#40 - Eric Liao / rcliaodev

12/07/2017 at 07:51AM

19
#41 - Alphonse Mariya / alfunx

01/08/2018 at 06:23PM

19
#42 - ParasamGateZero / ParasamGateZero

01/14/2018 at 10:53AM

19
#43 - Arijus / argshook

02/03/2018 at 03:04PM

19
#44 - Urbanovics Péter / UrbanovicsP

02/20/2018 at 12:41PM

19
#45 - Guirec CORBEL / GuirecCorbel

02/27/2018 at 01:29AM

19
#46 - LC / leeren

03/01/2018 at 08:39AM

19
#47 - ewalk153 / ewalk153

04/01/2018 at 02:04AM

19
#48 - platypusDancing / platypusDancing

04/27/2018 at 05:49AM

19
#49 - golfer / golfer30767399

05/04/2018 at 11:52PM

19
#50 - Kaydo Alders / Yousousen

05/06/2018 at 10:51PM

19
#51 - Matt Aschmann / ma7hatter

05/25/2018 at 09:57PM

19
#52 - omrisarig / omrisarig

06/16/2018 at 10:43AM

20
#53 - Jacob Buete / JBuete

08/27/2017 at 03:24AM

20
#54 - ushumpei / ushumpei_

08/27/2017 at 03:40AM

20
#55 - Vaughn Cato / vaughncato

08/27/2017 at 04:25AM

20
#56 - meribold / mribld

08/27/2017 at 09:00AM

20
#57 - Dmitry Zudochkin / vredniy

08/27/2017 at 09:10AM

20
#58 - Cristian Lupașcu / clupasq

08/27/2017 at 06:11PM

20
#59 - Sheldon Johnson / sheldyjohnson

08/28/2017 at 12:47AM

20
#60 - adeel hussain / adeelhussain

08/29/2017 at 06:14AM