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):
21
#91 - Paulo Romeira / @pauloromeira

08/24/2015 at 03:22AM

21
#92 - Dinesh Bhosale / @MrDineshBhosale

04/01/2016 at 02:20PM

21
#93 - yudera / @yudemente

06/22/2016 at 04:01PM

22
#94 - Michi Loro / @michiloro

04/06/2015 at 11:57AM

22
#95 - Liam Thurston / @lthurston188

08/18/2015 at 12:15AM

22
#96 - "Smylers" / @Smylers2

01/29/2016 at 02:40PM

22
#97 - André Peric Tavares / @AndrePeric

07/24/2016 at 10:56PM

22
#98 - Remus Dalrymple / @bornintheflames

05/07/2017 at 01:34AM

22
#99 - mevmev / @mevmev8

10/25/2021 at 08:53PM

22
#100 - vimgolfaccfekxh / @vimgolfaccfekxh

10/30/2022 at 09:40PM

23
#101 - Marek Wawrzos / @putisPenser

04/01/2015 at 04:33PM

23
#102 - ushumpei / @ushumpei_

04/05/2015 at 09:06AM

23
#103 - Yuval Netanel / @Yuval5555

04/12/2015 at 11:40AM

23
#104 - Geoff Gu / @geoff_gu

07/02/2015 at 01:30PM

23
#105 - Cristian Lupașcu / @clupasq

02/19/2016 at 03:48PM

23
#106 - 王运 / @640138017

07/25/2016 at 12:07AM

23
#107 - Jeremiah Goyette / @JeremiahGoyette

08/02/2016 at 04:38AM

23
#108 - BlackCap / @BlackCapCoder

11/30/2016 at 12:05PM

23
#109 - sijinyuan / @sijinyuan

03/03/2017 at 02:11AM

23
#110 - Mark Brody / @_markbrody

04/01/2017 at 11:46PM

23
#111 - Bill Ruddock / @biinari

05/03/2017 at 10:12PM

23
#112 - RockerZZY / @rocker_zzy

06/10/2020 at 04:10AM

24
#113 - Louis Caruana / @louiecaruana

03/30/2015 at 04:59AM

24
#114 - Eduardo / @earada

03/30/2015 at 07:20AM

24
#115 - Marcin Szamotulski / @me_coot

03/30/2015 at 10:22AM

24
#116 - TheProgrammer971 / @tp971

03/30/2015 at 04:54PM

24
#117 - Robin Moussu / @robin_moussu

03/30/2015 at 04:59PM

24
#118 - Global Maquereau / @GlobalMaquereau

04/02/2015 at 04:10PM

24
#119 - Alvin Samuelsson / @Avaconde

04/06/2015 at 11:55AM

24
#120 - Kaido Iwamoto / @odiak_

04/08/2015 at 06:14AM