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

279 active golfers, 958 entries

Leaderboard (lowest score wins):
22
#91 - Smylers / @Smylers2

01/29/2016 at 02:40PM

22
#92 - André Peric Tavares / @AndrePeric

07/24/2016 at 10:56PM

22
#93 - Remus Dalrymple / @bornintheflames

05/07/2017 at 01:34AM

22
#94 - mevmev / @mevmev8

10/25/2021 at 08:53PM

23
#95 - Marek Wawrzos / @putisPenser

04/01/2015 at 04:33PM

23
#96 - ushumpei / @ushumpei_

04/05/2015 at 09:06AM

23
#97 - Yuval Netanel / @Yuval5555

04/12/2015 at 11:40AM

23
#98 - Geoff Gu / @geoff_gu

07/02/2015 at 01:30PM

23
#99 - Cristian Lupașcu / @clupasq

02/19/2016 at 03:48PM

23
#100 - 王运 / @640138017

07/25/2016 at 12:07AM

23
#101 - Jeremiah Goyette / @JeremiahGoyette

08/02/2016 at 04:38AM

23
#102 - BlackCap / @BlackCapCoder

11/30/2016 at 12:05PM

23
#103 - sijinyuan / @sijinyuan

03/03/2017 at 02:11AM

23
#104 - Mark Brody / @_markbrody

04/01/2017 at 11:46PM

23
#105 - Bill Ruddock / @biinari

05/03/2017 at 10:12PM

23
#106 - RockerZZY / @rocker_zzy

06/10/2020 at 04:10AM

24
#107 - Louis Caruana / @louiecaruana

03/30/2015 at 04:59AM

24
#108 - Eduardo / @earada

03/30/2015 at 07:20AM

24
#109 - Marcin Szamotulski / @me_coot

03/30/2015 at 10:22AM

24
#110 - TheProgrammer971 / @tp971

03/30/2015 at 04:54PM

24
#111 - Robin Moussu / @robin_moussu

03/30/2015 at 04:59PM

24
#112 - Global Maquereau / @GlobalMaquereau

04/02/2015 at 04:10PM

24
#113 - Alvin Samuelsson / @Avaconde

04/06/2015 at 11:55AM

24
#114 - Kaido Iwamoto / @odiak_

04/08/2015 at 06:14AM

24
#115 - Elizabeth / @sprinkles418

04/09/2015 at 06:14PM

24
#116 - marcelo jacobus / @marcelo_jacobus

04/10/2015 at 07:51AM

24
#117 - Fan Zhang / @2bDeactivat3d

04/10/2015 at 09:41PM

24
#118 - Seiichi Satomi / @Sewitch7045

04/15/2015 at 11:13AM

24
#119 - 김재겸 / @KimJaeKyeom

04/20/2015 at 04:51AM

24
#120 - Alan Rafael / @alanrrb

05/04/2015 at 02:04AM