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):
21
#121 - Adam Taylor / the_adamtaylor

05/04/2018 at 03:01PM

22
#122 - tPenguinLTG / tpenguinltg

08/27/2017 at 03:04AM

22
#123 - SirVimGolf / SirVimGolf

08/27/2017 at 02:14PM

22
#124 - tempo dooake / tempo_dooake

09/01/2017 at 01:09AM

22
#125 - Matt Rixman / MattRixman

10/02/2017 at 04:16PM

22
#126 - Stefan Knudsen / knud32

10/06/2017 at 03:29PM

22
#127 - Mike Reinhardt / subitoforte

10/17/2017 at 06:01PM

22
#128 - BouboulouVimGolf / BouboulouVG

10/31/2017 at 04:41PM

22
#129 - Dominic Z / thammaaa

12/21/2017 at 09:59AM

22
#130 - Rakesh P / rakeshpgopal

04/29/2018 at 08:33AM

23
#131 - Justin Wyne / wyne

08/27/2017 at 01:09AM

23
#132 - James / Dronak

08/27/2017 at 01:24AM

23
#133 - Derek Schrock / derekschrock

08/27/2017 at 09:17AM

23
#134 - Jimmy C / jimmehc

08/31/2017 at 07:01AM

23
#135 - Gurukandhamoorthi / Gurukandhamoor1

09/02/2017 at 05:01PM

23
#136 - lujianmei / lujianmei

09/05/2017 at 08:49AM

23
#137 - Koo Zhengqun / zhengqunkoo

09/08/2017 at 02:40PM

23
#138 - Alex / alexhod08054568

09/10/2017 at 05:52PM

23
#139 - Jasper Armstrong / jasperarmstrong

09/14/2017 at 10:47AM

23
#140 - Alphonso De La Morte / FatDrakula

09/17/2017 at 12:22PM

23
#141 - Conrad / Conrad55084958

09/17/2017 at 01:57PM

23
#142 - Maciek Wcislik / inoutin

09/19/2017 at 12:55PM

23
#143 - Andrew's Testing / andrewwwtest

09/19/2017 at 09:56PM

23
#144 - Diego Roccia / rocciadiego

09/19/2017 at 10:02PM

23
#145 - Alex Coventry / AlexCoventry4

09/21/2017 at 12:21AM

23
#146 - Tim Varley / varleti

09/25/2017 at 04:22PM

23
#147 - Elton Kamami / pixel_grid

10/07/2017 at 07:24PM

23
#148 - Felipe Apostol / flipjsio

10/08/2017 at 05:52PM

23
#149 - Jason Stidd / jd_stidd

10/10/2017 at 08:33PM

23
#150 - Wolly Woodpecker / WollyWoodpecker

10/13/2017 at 03:28PM