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):
18
#31 - jackliusr / @jackliusr

01/13/2016 at 09:06AM

18
#32 - Roberto Carraretto / @robcarraretto

01/26/2016 at 11:55PM

18
#33 - Aleksey Zhidkov / @AlexeyZhidkov

01/29/2016 at 05:26AM

18
#34 - ben kavanagh / @bkava

02/23/2016 at 04:19AM

18
#35 - John Smith / @literacyisgood

03/21/2016 at 08:06PM

18
#36 - Mister Knister / @vimgolf_ctrl_x

03/24/2016 at 01:01PM

18
#37 - Ram Tamtam / @ramtamtamtam

06/24/2016 at 02:02PM

18
#38 - Pedro Santos / @pedrosans

07/09/2016 at 11:33AM

18
#39 - jdupont655 / @jdupont655

09/02/2016 at 04:38PM

18
#40 - Stephen Aument / @saument

09/04/2016 at 03:55AM

18
#41 - trx / @trxdbg

10/13/2016 at 12:54PM

18
#42 - Yann / @yannstad

02/23/2017 at 11:45PM

18
#43 - Zhihong Liu / @pieapple03

02/27/2017 at 01:26PM

18
#44 - 梧桐王子 / @WutongYujie

05/05/2017 at 01:47AM

18
#45 - 杨洋 / @176795444

07/02/2017 at 04:50AM

18
#46 - Darren Weston / @dazWestonUK

08/31/2017 at 05:55PM

18
#47 - Turkey Man / @lvturkeyman

11/11/2017 at 06:06PM

18
#48 - ParasamGateZero / @ParasamGateZero

02/16/2018 at 10:26PM

18
#49 - François Marais / @maraisf

04/03/2018 at 08:53AM

18
#50 - DHM / @DHM29978992

04/25/2018 at 03:24AM

18
#51 - Daniël De Koker / @daniel_koker

07/02/2018 at 09:53AM

18
#52 - fucus / @fishlovebanana

08/15/2018 at 09:52AM

18
#53 - Dax / @zacoxi

11/14/2018 at 01:20PM

18
#54 - name / @name65894813

11/23/2018 at 05:26PM

18
#55 - alekfed / @alek_fed

04/15/2019 at 06:16PM

18
#56 - Grant / @grant_7788

05/30/2019 at 02:04AM

18
#57 - majo senf / @majo_senf

06/21/2019 at 08:22AM

18
#58 - vimgolfer / @vimgolfer7

10/22/2019 at 01:09PM

18
#59 - Miłosz Łakomy / @foobar01123

11/20/2019 at 09:34AM

19
#60 - Garrett Smith / @garrettwhsmith

03/31/2015 at 12:06AM