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 5518cd2bfb03aa1d9402a6a3

Fix the XML

The challenge consists in having a valid xml from an incomplete source.

Start file
<I>
    <hate>
        <xml>hello
        <files>files
    </hate>
    <hate>
        <xml>xml
        <files>world
    </hate>
</I>
End file
<I>
    <hate>
        <xml>hello</xml>
        <files>files</files>
    </hate>
    <hate>
        <xml>xml</xml>
        <files>world</files>
    </hate>
</I>

View Diff

3,4c3,4
<         <xml>hello
<         <files>files
---
>         <xml>hello</xml>
>         <files>files</files>
7,8c7,8
<         <xml>xml
<         <files>world
---
>         <xml>xml</xml>
>         <files>world</files>

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 289 remaining solutions by signing in and submitting your own entry
#290 Rafal C. / @RafalC37709324 - Score: 125 - 11/17/20 @ 20:16
jjev%%f>y$<Esc>hhhhhhhhhvlllly$Pupj^ehhhhhvely$p<Esc>hhhhhi/<Esc>khhi/<Esc>jjjjahhh<BS><BS><BS>hh<BS><BS><Esc>hhhhhhhvllllly$ap<Esc>p<Esc>hhhhhhxli/<Esc>$x<Esc>ja</files><Esc>h:wq<CR>

0 comments


Created by: @leo_luz

290 active golfers, 1039 entries

Leaderboard (lowest score wins):
27
#211 - JS / @jjohsan

09/13/2015 at 10:30AM

27
#212 - Elrrrrrrr / @Elrrrrrrr

01/03/2016 at 08:14AM

27
#213 - daHueby / @daHueby

01/10/2017 at 10:24AM

27
#214 - Миша Сорокин / @rafmikovi4

04/11/2017 at 07:54AM

27
#215 - KoroneListener / @KoroneListener

09/05/2024 at 08:56AM

28
#216 - Jordana Lachow / @TomofBedlam

04/06/2015 at 10:35PM

28
#217 - Mattias Fransson / @azzidoos

04/10/2015 at 08:40PM

28
#218 - chvzvhn / @chvzvhn

04/26/2015 at 02:15AM

28
#219 - luffy / @raxcoi

05/27/2015 at 08:37PM

28
#220 - Gabriel Magno / @GabrielMagno

06/08/2015 at 09:22PM

28
#221 - Seth Yoder / @McMire315

06/24/2015 at 07:30PM

28
#222 - Endre Galaczi / @galacziendre

07/28/2015 at 01:41PM

28
#223 - aisapatino / @aisapatino

08/02/2015 at 03:44AM

28
#224 - Tamas Gal (Tom) / @tamasgal

09/26/2015 at 12:02PM

28
#225 - Ryan van Rensburg / @rdvr001

07/21/2016 at 01:22PM

28
#226 - Daniel Bellenger / @DanielBellenger

09/30/2016 at 07:33PM

28
#227 - Gurukandhamoorthi / @Gurukandhamoor1

07/11/2017 at 02:01PM

28
#228 - Paul Inc / @hiniol1982

07/13/2017 at 08:33PM

28
#229 - William Hamilton / @BobHamiltonijk

05/26/2018 at 04:51PM

28
#230 - vim-golf-requirement / @VRequirement

10/09/2020 at 03:53PM

29
#231 - Raj / @brshenoy

04/02/2015 at 05:52PM

29
#232 - Patrick M. Regan / @rubbsdecvik

04/03/2015 at 06:47PM

29
#233 - matthieu le grix / @mlegrix

04/04/2015 at 09:31AM

29
#234 - Guy E Matz / @guymatz

04/07/2015 at 03:19PM

29
#235 - Timmy! / @timx

04/07/2015 at 03:22PM

29
#236 - William Ott / @oddalot

04/07/2015 at 07:00PM

29
#237 - Tact Overflow / @muppling

04/09/2015 at 02:50PM

29
#238 - Rob Milward / @RobMilward

04/09/2015 at 10:11PM

29
#239 - John Lee / @NSA_agent_209

04/12/2015 at 06:47PM

29
#240 - Daniel Pham / @dany_pham

04/15/2015 at 10:41PM