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):
20
#61 - Darren Weston / dazWestonUK

08/29/2017 at 06:06PM

20
#62 - Ky Statham / ijustwannacode

08/30/2017 at 06:18AM

20
#63 - bencvim / bencvim

08/30/2017 at 11:44PM

20
#64 - Pedro Santos / pedrosans

08/31/2017 at 08:10AM

20
#65 - Christian Stammen / c0smiq

08/31/2017 at 01:03PM

20
#66 - Jesper Oskarsson / jesosk

09/01/2017 at 06:05AM

20
#67 - joskarsson / joskarsson7

09/01/2017 at 08:28AM

20
#68 - Solomon / Trugbildjaeger

09/02/2017 at 01:46PM

20
#69 - albert / albert67511150

09/07/2017 at 08:56PM

20
#70 - Cyhors / Cyhors

09/13/2017 at 06:46AM

20
#71 - Petro Тrouq / zulolosi

09/16/2017 at 11:37AM

20
#72 - jirgn / jirgn

09/16/2017 at 04:35PM

20
#73 - elmoloves / ElmoLovesSilly

09/19/2017 at 09:45PM

20
#74 - あっつぉ / tadokorohitoshi

09/21/2017 at 08:51AM

20
#75 - Karamfil / lz1aai

09/24/2017 at 09:01PM

20
#76 - Bonjew / Bonjew_L

09/25/2017 at 06:29AM

20
#77 - Anne Pacalet / _Anne_P

09/29/2017 at 09:18AM

20
#78 - Chris Atanasian / ChrisAtanasian

10/03/2017 at 09:34PM

20
#79 - Anton Popov / agraver

10/04/2017 at 02:38PM

20
#80 - Stephen Betts / stephenbetts

10/10/2017 at 04:00PM

20
#81 - {name: 'jairo'} / jairoandre

10/11/2017 at 08:35PM

20
#82 - えるざっぷ / _elzup_

10/13/2017 at 06:44AM

20
#83 - Robert Mosher / rcmosher

10/18/2017 at 04:09PM

20
#84 - Thai Pangsakulyanont / dtinth

10/29/2017 at 07:08PM

20
#85 - ryuugekisya / ryuugekisya

11/04/2017 at 03:45AM

20
#86 - Kim Hwa Joong / hanmwoi

12/14/2017 at 01:32PM

20
#87 - Luke Parsons / lukeparsons

12/28/2017 at 08:52PM

20
#88 - BarbaJol / drpproteus

12/30/2017 at 01:52PM

20
#89 - John C Shea / MHSSachems

01/29/2018 at 11:24AM

20
#90 - lopezpaz_ / lopezpaz_

02/02/2018 at 10:06AM