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):
28
#211 - Daniel Bellenger / @DanielBellenger

09/30/2016 at 07:33PM

28
#212 - Gurukandhamoorthi / @Gurukandhamoor1

07/11/2017 at 02:01PM

28
#213 - Paul Inc / @hiniol1982

07/13/2017 at 08:33PM

28
#214 - William Hamilton / @BobHamiltonijk

05/26/2018 at 04:51PM

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

10/09/2020 at 03:53PM

29
#216 - Raj / @brshenoy

04/02/2015 at 05:52PM

29
#217 - Patrick M. Regan / @rubbsdecvik

04/03/2015 at 06:47PM

29
#218 - matthieu le grix / @mlegrix

04/04/2015 at 09:31AM

29
#219 - Guy E Matz / @guymatz

04/07/2015 at 03:19PM

29
#220 - Timmy! / @timx

04/07/2015 at 03:22PM

29
#221 - William Ott / @oddalot

04/07/2015 at 07:00PM

29
#222 - Tact Overflow / @muppling

04/09/2015 at 02:50PM

29
#223 - Rob Milward / @RobMilward

04/09/2015 at 10:11PM

29
#224 - John Lee / @NSA_agent_209

04/12/2015 at 06:47PM

29
#225 - Daniel Pham / @dany_pham

04/15/2015 at 10:41PM

29
#226 - adkafka / @adkafka

04/20/2015 at 03:25AM

29
#227 - 𖀐 π”…π”žπ”‘π”€π”’π”― 𖀐 πŸ¦‡ / @drksvnt

06/25/2015 at 11:19AM

29
#228 - Gerald Tilma / @GeraldTilma

10/17/2015 at 10:44PM

29
#229 - Anshu Avinash / @anshu_avinash

10/18/2015 at 05:52PM

29
#230 - Jakob SchΓΆttl / @jschoettl

12/20/2015 at 04:48AM

29
#231 - Kevin Burns / @kburnsinfo

02/16/2016 at 10:30PM

29
#232 - Holden Lewis / @lonnez90

02/25/2016 at 04:27PM

29
#233 - Kir Shatrov / @kirshatrov

06/19/2016 at 10:56PM

29
#234 - TimMcGuire / @mcguire

09/03/2020 at 01:02PM

30
#235 - Darrell Sandstrom / @dandstrom

04/04/2015 at 12:27AM

30
#236 - Brian Olpin / @bolpin

04/13/2015 at 06:38AM

30
#237 - simonced / @simonced

04/16/2015 at 03:43AM

30
#238 - Adam Lewis / @thomas_aquinas

04/17/2015 at 06:55PM

30
#239 - ddddave / @baby_goat

04/19/2015 at 05:50PM

30
#240 - alex / @alexAngle8

08/22/2015 at 02:13PM