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):
30
#241 - simonced / @simonced

04/16/2015 at 03:43AM

30
#242 - Adam Lewis / @thomas_aquinas

04/17/2015 at 06:55PM

30
#243 - ddddave / @baby_goat

04/19/2015 at 05:50PM

30
#244 - alex / @alexAngle8

08/22/2015 at 02:13PM

31
#245 - Jason Spafford / @JasonSpafford

05/26/2015 at 05:07PM

31
#246 - Jonas Ng / @jnshey

07/20/2015 at 05:02PM

31
#247 - wrglprmft1 / @wrglprmft1

01/26/2019 at 03:17PM

31
#248 - Matthieu Cneude / @Cneude_Matthieu

10/09/2020 at 03:41PM

32
#249 - Pascal / @ph3nx

04/10/2015 at 09:40AM

32
#250 - Krzysztof / @Krzysztof2K

04/12/2015 at 11:06AM

32
#251 - Ben Hill / @KaizenSoze70

06/30/2017 at 08:39PM

33
#252 - Alex Bartol / @alexbartol

05/07/2015 at 05:27PM

34
#253 - Alexandre Ignjatovic / @bankair

03/30/2015 at 07:22AM

34
#254 - bc / @_bcarrell

04/03/2015 at 05:18PM

34
#255 - Anil Narayan / @AnilNarayan2013

09/14/2020 at 02:54AM

35
#256 - Benny Wong / @bdotdub

04/02/2015 at 05:47PM

35
#257 - MoreWillMusic / @morewillmusic

10/09/2020 at 03:38PM

36
#258 - Teemu Okkonen / @TeemuOkkonen

07/07/2015 at 09:25PM

36
#259 - Jurica / @Jurica34581259

11/16/2018 at 03:55PM

36
#260 - Aaron / @_Lordofthevoid_

12/06/2019 at 01:44PM

37
#261 - kungfuchad / @kungfuchad

03/30/2015 at 11:16AM

37
#262 - Bruce Park / @bpark0

04/02/2015 at 12:05AM

37
#263 - Aurélien Deharbe / @0x_ad

06/02/2015 at 08:40AM

38
#264 - Ifeoluwa Lawal / @IfeLawl

10/09/2020 at 03:43PM

39
#265 - Mike McGowan / @mikemcgowan75

04/16/2015 at 09:18PM

39
#266 - AAbraxas / @AAbraxas1

10/15/2020 at 07:42PM

40
#267 - Evan Coleman / @edc1591

04/02/2015 at 05:50PM

42
#268 - Arthur Karganyan / @arthurkarganyan

04/12/2015 at 10:39AM

43
#269 - Zhao Bin / @ZhaoBin2

06/07/2016 at 04:04PM

43
#270 - Никита Семёнов / @NiKoS1707

04/13/2022 at 10:49PM