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
#1 - Kerson Hsiao / KersonHsiao

08/31/2017 at 02:35AM

19
#2 - Saki Gw / Sakigw

08/31/2017 at 09:43AM

19
#3 - Virgil Ashruf / eSrem

08/31/2017 at 12:11PM

19
#4 - Kutsan Kaplan / kutsankaplan

08/31/2017 at 06:21PM

19
#5 - zava / znl1087

09/03/2017 at 08:54AM

19
#6 - John Braxler / braxler

09/06/2017 at 07:25PM

19
#7 - Vimgolf / vimgolf987

09/07/2017 at 09:40PM

19
#8 - Alejandro Catalina / AleexCatalina

09/10/2017 at 04:39PM

19
#9 - 郑晓东 / DGivxLTVopiOQap

09/12/2017 at 03:22AM

19
#10 - herbage / herbage2

09/13/2017 at 07:54AM

19
#11 - Alonzo / tolver_a

09/17/2017 at 08:59AM

19
#12 - Smylers / Smylers2

09/18/2017 at 12:38PM

19
#13 - how ja din / o157529

09/20/2017 at 03:41AM

19
#14 - Owen / owengeorge_

09/20/2017 at 06:59AM

19
#15 - Sean Moogan / Moogarillo

09/22/2017 at 03:23PM

19
#16 - Bibek Shah / Bibekshah

09/22/2017 at 08:05PM

19
#17 - Kristoffer Ahlqvist / ahlqvistk

09/24/2017 at 01:42PM

19
#18 - Sergio / voyeg3r

09/26/2017 at 08:53AM

19
#19 - F / gofilby

09/26/2017 at 07:07PM

19
#20 - Luke Bryant / LukeBryant55

09/29/2017 at 02:41PM

19
#21 - Jon Wålstedt / jonwalstedt

09/30/2017 at 10:26PM

19
#22 - Michail Pishchagin / mblsha

10/02/2017 at 07:46AM

19
#23 - 5tephen / geluso

10/02/2017 at 09:30PM

19
#24 - Jon Krause / jkrause314

10/08/2017 at 10:29PM

19
#25 - Zakaria ANBARI / abualy4400

10/11/2017 at 03:08PM

19
#26 - Rich Cheng / sedm0784

10/11/2017 at 03:42PM

19
#27 - Rafael Souza / heavyDosesOfDMT

10/11/2017 at 08:38PM

19
#28 - Ron Alexssen / Ralexhere

10/11/2017 at 09:19PM

19
#29 - thvdburgt / thvdburgt

10/16/2017 at 10:30AM

19
#30 - mkl / Hnr1zklc

10/27/2017 at 11:16AM