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):
24
#121 - Lifepillar / @lifepillar

09/11/2015 at 07:16PM

24
#122 - coltruindie / @e10nevwa

10/12/2015 at 12:13PM

24
#123 - Bogumił Kamiński / @BogumilKaminski

10/26/2015 at 03:57PM

24
#124 - merphant / @merphant

10/28/2015 at 01:28AM

24
#125 - Pete Sevander / @Sevanteri

11/12/2015 at 01:05PM

24
#126 - Michael Buckley / @apolatg

02/13/2016 at 09:09PM

24
#127 - Kostas / @blackraven_13

02/23/2016 at 08:27PM

24
#128 - Filippos K. / @filkaris

03/21/2016 at 04:22PM

24
#129 - glepha / @glepha_vim

03/22/2016 at 11:35PM

24
#130 - Jan Bundesmann / @janbundesmann

03/24/2016 at 04:10PM

24
#131 - Janko Jerinic / @JankoJerinic

03/26/2016 at 07:45AM

24
#132 - WANG lina / @WANG__Lina

07/29/2016 at 01:28AM

24
#133 - citaret / @citaret

08/27/2016 at 11:29AM

24
#134 - TweetDreams / @TweetMusicians

10/10/2016 at 06:20AM

24
#135 - Christian Rondeau / @c_rondeau

10/27/2016 at 11:51PM

24
#136 - Joe Heywood / @joehabsjoe

01/01/2018 at 11:45AM

24
#137 - Bhagwan / @El_Bhagwan

06/29/2020 at 02:35AM

25
#138 - LeoLuz / @leo_luz

03/30/2015 at 04:26AM

25
#139 - Juan-Lucas Picard / @davidmh

03/30/2015 at 04:28AM

25
#140 - ipson_nek / @ipson_nek

03/30/2015 at 03:19PM

25
#141 - Ilker Mutlu / @ilkermutlu

04/02/2015 at 08:25AM

25
#142 - John Horne / @TheDirtyJanitor

04/04/2015 at 08:16PM

25
#143 - Rathrio / @Rathrio

04/05/2015 at 12:15PM

25
#144 - Hendrik Lammers / @hendriklammers

04/07/2015 at 07:05PM

25
#145 - talineo / @talineo_

04/10/2015 at 10:13PM

25
#146 - Kamil Laskowski / @laskowskikamil

04/12/2015 at 07:42PM

25
#147 - mx9 / @mutilx9

04/16/2015 at 05:51PM

25
#148 - nulusr / @nulusr

04/21/2015 at 10:54AM

25
#149 - Gracjan Grala / @gracjangrala

04/21/2015 at 11:01PM

25
#150 - mat / @matgeist

05/26/2015 at 05:51PM