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 383 remaining solutions by signing in and submitting your own entry
#384 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

384 active golfers, 1542 entries

Leaderboard (lowest score wins):
20
#181 - hokonch / @hokonch

12/23/2019 at 03:34PM

20
#182 - Scott Smith / @Scottaino

01/03/2020 at 06:26PM

20
#183 - Jason Neylon / @jasonneylon

01/25/2020 at 10:30AM

20
#184 - Daniel Simionato / @weseven

01/26/2020 at 01:22PM

20
#185 - eshel / @EshelBM

02/27/2020 at 04:35PM

20
#186 - Wouter Horlings / @Achilleshiel

03/13/2020 at 06:52PM

20
#187 - floyd / @floyd10086

03/19/2020 at 07:08AM

20
#188 - 薛浩滎 / @iTPChbTeI4ZW9s3

03/24/2020 at 09:33AM

20
#189 - Ming Dai / @MingDai2

06/30/2020 at 06:51PM

20
#190 - Ebi / @ehan6

07/09/2020 at 07:35PM

20
#191 - hepebexè / @hepebexe

12/11/2020 at 09:23PM

20
#192 - roudens / @roudens2

01/04/2021 at 12:56AM

20
#193 - Ray Dennis / @raysden

01/11/2021 at 04:20PM

20
#194 - Tinko Minko / @tandikula

01/24/2021 at 09:14AM

20
#195 - Francois Marais / @maraisf

05/19/2021 at 08:27AM

20
#196 - Michel Viktor / @tomkpz

07/31/2021 at 05:08AM

20
#197 - Luoyb / @Luoyb

11/15/2023 at 05:30AM

20
#198 - asirago / @asiragoo

12/13/2023 at 11:29PM

20
#199 - Leon Kacowicz / @leonkacowicz

05/13/2025 at 10:23PM

20
#200 - zhs / @ZH-S

05/22/2025 at 02:37PM

21
#201 - YNWP / @ynw_P

08/27/2017 at 04:20AM

21
#202 - よんわ / @ynw_s

08/27/2017 at 04:24AM

21
#203 - Peter B / @l0wm4x

08/27/2017 at 05:37PM

21
#204 - Jan Bundesmann / @janbundesmann

08/28/2017 at 07:43AM

21
#205 - Song Zheng / @songz

08/29/2017 at 02:24AM

21
#206 - 杨洋 / @176795444

08/29/2017 at 10:50AM

21
#207 - hatoo / @hato2000

08/30/2017 at 07:36AM

21
#208 - Markus / @dayshade_7

08/30/2017 at 02:51PM

21
#209 - lack / @lack84639857

09/08/2017 at 10:26AM

21
#210 - Jonathan Eidsness / @jonathaneidsnes

09/15/2017 at 05:34AM