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

290 active golfers, 1039 entries

Leaderboard (lowest score wins):
29
#241 - adkafka / @adkafka

04/20/2015 at 03:25AM

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

06/25/2015 at 11:19AM

29
#243 - Gerald Tilma / @GeraldTilma

10/17/2015 at 10:44PM

29
#244 - Anshu Avinash / @anshu_avinash

10/18/2015 at 05:52PM

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

12/20/2015 at 04:48AM

29
#246 - Kevin Burns / @kburnsinfo

02/16/2016 at 10:30PM

29
#247 - Holden Lewis / @lonnez90

02/25/2016 at 04:27PM

29
#248 - Kir Shatrov / @kirshatrov

06/19/2016 at 10:56PM

29
#249 - TimMcGuire / @mcguire

09/03/2020 at 01:02PM

30
#250 - Darrell Sandstrom / @dandstrom

04/04/2015 at 12:27AM

30
#251 - Brian Olpin / @bolpin

04/13/2015 at 06:38AM

30
#252 - simonced / @simonced

04/16/2015 at 03:43AM

30
#253 - Adam Lewis / @thomas_aquinas

04/17/2015 at 06:55PM

30
#254 - ddddave / @baby_goat

04/19/2015 at 05:50PM

30
#255 - alex / @alexAngle8

08/22/2015 at 02:13PM

31
#256 - Jason Spafford / @JasonSpafford

05/26/2015 at 05:07PM

31
#257 - Jonas Ng / @jnshey

07/20/2015 at 05:02PM

31
#258 - wrglprmft1 / @wrglprmft1

01/26/2019 at 03:17PM

31
#259 - Matthieu Cneude / @Cneude_Matthieu

10/09/2020 at 03:41PM

32
#260 - Pascal / @ph3nx

04/10/2015 at 09:40AM

32
#261 - Krzysztof / @Krzysztof2K

04/12/2015 at 11:06AM

32
#262 - Ben Hill / @KaizenSoze70

06/30/2017 at 08:39PM

33
#263 - Alex Bartol / @alexbartol

05/07/2015 at 05:27PM

34
#264 - Alexandre Ignjatovic / @bankair

03/30/2015 at 07:22AM

34
#265 - bc / @_bcarrell

04/03/2015 at 05:18PM

34
#266 - Anil Narayan / @AnilNarayan2013

09/14/2020 at 02:54AM

35
#267 - Benny Wong / @bdotdub

04/02/2015 at 05:47PM

35
#268 - MoreWillMusic / @morewillmusic

10/09/2020 at 03:38PM

36
#269 - Teemu Okkonen / @TeemuOkkonen

07/07/2015 at 09:25PM

36
#270 - Jurica / @Jurica34581259

11/16/2018 at 03:55PM