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):
31
#241 - Jason Spafford / @JasonSpafford

05/26/2015 at 05:07PM

31
#242 - Jonas Ng / @jnshey

07/20/2015 at 05:02PM

31
#243 - wrglprmft1 / @wrglprmft1

01/26/2019 at 03:17PM

31
#244 - Matthieu Cneude / @Cneude_Matthieu

10/09/2020 at 03:41PM

32
#245 - Pascal / @ph3nx

04/10/2015 at 09:40AM

32
#246 - Krzysztof / @Krzysztof2K

04/12/2015 at 11:06AM

32
#247 - Ben Hill / @KaizenSoze70

06/30/2017 at 08:39PM

33
#248 - Alex Bartol / @alexbartol

05/07/2015 at 05:27PM

34
#249 - Alexandre Ignjatovic / @bankair

03/30/2015 at 07:22AM

34
#250 - bc / @_bcarrell

04/03/2015 at 05:18PM

34
#251 - Anil Narayan / @AnilNarayan2013

09/14/2020 at 02:54AM

35
#252 - Benny Wong / @bdotdub

04/02/2015 at 05:47PM

35
#253 - MoreWillMusic / @morewillmusic

10/09/2020 at 03:38PM

36
#254 - Teemu Okkonen / @TeemuOkkonen

07/07/2015 at 09:25PM

36
#255 - Jurica / @Jurica34581259

11/16/2018 at 03:55PM

36
#256 - Aaron / @_Lordofthevoid_

12/06/2019 at 01:44PM

37
#257 - kungfuchad / @kungfuchad

03/30/2015 at 11:16AM

37
#258 - Bruce Park / @bpark0

04/02/2015 at 12:05AM

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

06/02/2015 at 08:40AM

38
#260 - Ifeoluwa Lawal / @IfeLawl

10/09/2020 at 03:43PM

39
#261 - Mike McGowan / @mikemcgowan75

04/16/2015 at 09:18PM

39
#262 - AAbraxas / @AAbraxas1

10/15/2020 at 07:42PM

40
#263 - Evan Coleman / @edc1591

04/02/2015 at 05:50PM

42
#264 - Arthur Karganyan / @arthurkarganyan

04/12/2015 at 10:39AM

43
#265 - Zhao Bin / @ZhaoBin2

06/07/2016 at 04:04PM

46
#266 - Jon Featherstone / @feathj

06/21/2015 at 05:07AM

47
#267 - Ayman Farhat / @aymanfarhat

06/03/2015 at 12:07PM

48
#268 - Samir Sadek / @netsamir

07/20/2015 at 02:29PM

51
#269 - Luis Rodriguez / @luisthecoder

11/16/2018 at 03:38AM

57
#270 - Anthony Astige / @AnthonyAstige

04/01/2015 at 12:34AM