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):
36
#271 - Aaron / @_Lordofthevoid_

12/06/2019 at 01:44PM

37
#272 - kungfuchad / @kungfuchad

03/30/2015 at 11:16AM

37
#273 - Bruce Park / @bpark0

04/02/2015 at 12:05AM

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

06/02/2015 at 08:40AM

38
#275 - Ifeoluwa Lawal / @IfeLawl

10/09/2020 at 03:43PM

39
#276 - Mike McGowan / @mikemcgowan75

04/16/2015 at 09:18PM

39
#277 - AAbraxas / @AAbraxas1

10/15/2020 at 07:42PM

40
#278 - Evan Coleman / @edc1591

04/02/2015 at 05:50PM

42
#279 - Arthur Karganyan / @arthurkarganyan

04/12/2015 at 10:39AM

43
#280 - Zhao Bin / @ZhaoBin2

06/07/2016 at 04:04PM

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

04/13/2022 at 10:49PM

46
#282 - Jon Featherstone / @feathj

06/21/2015 at 05:07AM

47
#283 - Ayman Farhat / @aymanfarhat

06/03/2015 at 12:07PM

48
#284 - Samir Sadek / @netsamir

07/20/2015 at 02:29PM

49
#285 - rappenstein2 / @rappenstein2

01/17/2022 at 04:29PM

51
#286 - Luis Rodriguez / @luisthecoder

11/16/2018 at 03:38AM

57
#287 - Anthony Astige / @AnthonyAstige

04/01/2015 at 12:34AM

62
#288 - Theodore DeRego / @tedsta0

12/08/2015 at 03:13AM

75
#289 - Jiawei Li / @calvin_lee2

01/24/2022 at 05:23AM

125
#290 - Rafal C. / @RafalC37709324

11/17/2020 at 08:16PM