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 270 remaining solutions by signing in and submitting your own entry
#271 Theodore DeRego / @tedsta0 - Score: 62 - 12/08/15 @ 03:13
:3<CR>A</xml><Esc>jA</xm<BS><BS><BS>/files><Esc>:7<CR>A</a<BS>xml><Esc>jA<fil<BS><BS><BS>/files><Esc>:wq<CR>

0 comments


Created by: @leo_luz

271 active golfers, 920 entries

Leaderboard (lowest score wins):
26
#181 - Wade / @vvandy

05/13/2015 at 05:48AM

26
#182 - Gafton Paul / @Paul9222

08/26/2015 at 12:13AM

26
#183 - Árpád Krejczinger / @krarpi

11/02/2015 at 04:46PM

26
#184 - Oliver Christ / @0liverChrist

07/12/2016 at 10:31PM

26
#185 - axnyff / @axnyff

09/13/2016 at 03:26PM

26
#186 - caplod / @caplod

03/28/2017 at 05:46PM

26
#187 - Geoff / @RealGeoffErwin

12/18/2017 at 08:29PM

26
#188 - Sxcy / @SxcyX

10/22/2018 at 09:36PM

26
#189 - Brendan Schaenzer / @bschaenzer

09/30/2020 at 07:48PM

27
#190 - Olivier Debon / @OlivierSwift

04/02/2015 at 01:23PM

27
#191 - Lieuwe Rooijakkers / @LieuweR

04/11/2015 at 10:18PM

27
#192 - Omer Lachish / @rauchy

04/12/2015 at 11:32AM

27
#193 - Zach Morgan / @zpmorgan

05/02/2015 at 06:21PM

27
#194 - Florent F. / @floff01

06/09/2015 at 11:46AM

27
#195 - Alexey Kotov / @atercat

07/22/2015 at 02:10PM

27
#196 - ZeroKelvin Keyboard / @zkkeyboard

08/14/2015 at 05:01AM

27
#197 - JS / @jjohsan

09/13/2015 at 10:30AM

27
#198 - Elrrrrrrr / @Elrrrrrrr

01/03/2016 at 08:14AM

27
#199 - daHueby / @daHueby

01/10/2017 at 10:24AM

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

04/11/2017 at 07:54AM

28
#201 - Jordana Lachow / @TomofBedlam

04/06/2015 at 10:35PM

28
#202 - Mattias Fransson / @azzidoos

04/10/2015 at 08:40PM

28
#203 - chvzvhn / @chvzvhn

04/26/2015 at 02:15AM

28
#204 - luffy / @raxcoi

05/27/2015 at 08:37PM

28
#205 - Gabriel Magno / @GabrielMagno

06/08/2015 at 09:22PM

28
#206 - Seth Yoder / @McMire315

06/24/2015 at 07:30PM

28
#207 - Endre Galaczi / @galacziendre

07/28/2015 at 01:41PM

28
#208 - aisapatino / @aisapatino

08/02/2015 at 03:44AM

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

09/26/2015 at 12:02PM

28
#210 - Ryan van Rensburg / @rdvr001

07/21/2016 at 01:22PM