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
#91 - Henrique Malheiro / rike09

02/17/2018 at 05:20PM

20
#92 - bruno / LokoPoggi

02/24/2018 at 02:38AM

20
#93 - wes / _weslly

03/11/2018 at 03:13AM

20
#94 - Lisa Ugray / lisa_ugray

03/13/2018 at 08:08PM

20
#95 - Pablo / suspekt007

04/08/2018 at 07:47AM

20
#96 - Frank Malone / FrankMa00268686

04/08/2018 at 03:51PM

20
#97 - DHM / DHM29978992

04/11/2018 at 08:00PM

20
#98 - nomsayin / nomsayin

04/16/2018 at 02:59AM

20
#99 - Justin Hoyt / JustinHoyt24

05/04/2018 at 03:14PM

20
#100 - vimgolfdummy / vimgolfdummy

05/05/2018 at 08:36PM

20
#101 - Lifepillar / lifepillar

05/06/2018 at 07:42PM

20
#102 - Martin H Juliussen / martinjuliussen

05/11/2018 at 07:30PM

20
#103 - Aunt Jovie / auntjovie

05/14/2018 at 10:06PM

20
#104 - Jonathan Camilleri / Too_Many_Taken

05/24/2018 at 01:43PM

21
#105 - YNWP / ynw_P

08/27/2017 at 04:20AM

21
#106 - よんわ / ynw_s

08/27/2017 at 04:24AM

21
#107 - Peter B / l0wm4x

08/27/2017 at 05:37PM

21
#108 - Jan Bundesmann / ixjab

08/28/2017 at 07:43AM

21
#109 - Song Zheng / songz

08/29/2017 at 02:24AM

21
#110 - 杨洋 / 176795444

08/29/2017 at 10:50AM

21
#111 - hatoo / hato2000

08/30/2017 at 07:36AM

21
#112 - dayshade / dayshade_7

08/30/2017 at 02:51PM

21
#113 - lack / lack84639857

09/08/2017 at 10:26AM

21
#114 - Jonathan Eidsness / jonathaneidsnes

09/15/2017 at 05:34AM

21
#115 - Nelson Ruivo / stringbasic

09/19/2017 at 10:47PM

21
#116 - Rami Hovi / hacker_lawyer

09/20/2017 at 08:41PM

21
#117 - MathijsHoogland / MathijsHoogland

12/28/2017 at 05:43PM

21
#118 - GreenPinguin / GreenPinguin2

03/08/2018 at 02:08PM

21
#119 - youyou / anth200

03/11/2018 at 10:54AM

21
#120 - vimthrowaway / vimgolf_throw

03/30/2018 at 06:31AM