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

244 active golfers, 803 entries

Leaderboard (lowest score wins):
18
#1 - Urtica dioica / @udioica

03/30/2015 at 06:00AM

18
#2 - Edgar Hipp / @EdgarHipp

03/30/2015 at 09:35AM

18
#3 - Roman Zolotarev / @romanzolotarev

03/30/2015 at 01:17PM

18
#4 - Alexander Kazakov / @volandkot

03/30/2015 at 03:06PM

18
#5 - Petro Тrouq / @zulolosi

03/30/2015 at 11:05PM

18
#6 - pftb12345 / @pftb12345

03/31/2015 at 05:18AM

18
#7 - John Braxler / @braxler

03/31/2015 at 01:47PM

18
#8 - DrHobo / @_DrHobo_

03/31/2015 at 07:40PM

18
#9 - Ala' Ibrahim / @alaa_ibrahim

04/01/2015 at 08:29AM

18
#10 - Khalid Harun / @KhalidHarun

04/03/2015 at 07:10AM

18
#11 - You Mustnotknow / @y8hVz6fJdm6Lt5q

04/03/2015 at 05:00PM

18
#12 - Sigurður Ægir Jónsso / @siggiae

04/07/2015 at 08:23AM

18
#13 - Yann Moisan / @YannMoisan

04/11/2015 at 02:59PM

18
#14 - Amir Kremer / @AmirKremer

04/12/2015 at 11:47AM

18
#15 - Bradley Hardy / @bradleyishardy

04/12/2015 at 09:18PM

18
#16 - Andreas Carben / @meiner_eins

04/25/2015 at 01:00PM

18
#17 - Spy / @thatspysaspy

05/13/2015 at 12:50AM

18
#18 - danweaver / @danweaver

05/14/2015 at 04:43AM

18
#19 - ahumph / @ahumph

06/09/2015 at 01:02PM

18
#20 - Hao Deng / @haodeng

06/12/2015 at 03:31AM

18
#21 - David Willming / @wdialvmeo

07/10/2015 at 04:21AM

18
#22 - Дима Давыдов / @xaykot

08/14/2015 at 10:03PM

18
#23 - Veritas / @_VeritasL

08/17/2015 at 04:18PM

18
#24 - Kirill Cherkashin / @kirjs

09/15/2015 at 02:25PM

18
#25 - Mike Adams / @davis_cromwell

09/30/2015 at 08:11PM

18
#26 - Walker Boh / @walker_boh

10/02/2015 at 01:15PM

18
#27 - Casey Pearring / @StandardBias

11/27/2015 at 09:28PM

18
#28 - ハチポケッツ / @8pockets

12/03/2015 at 12:23AM

18
#29 - Matthew Desjardins / @Desjardins_M

12/11/2015 at 09:40PM

18
#30 - Jon Krause / @jkrause314

01/12/2016 at 08:38AM