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):
25
#151 - Ilker Mutlu / @ilkermutlu

04/02/2015 at 08:25AM

25
#152 - John Horne / @TheDirtyJanitor

04/04/2015 at 08:16PM

25
#153 - Rathrio / @Rathrio

04/05/2015 at 12:15PM

25
#154 - Hendrik Lammers / @hendriklammers

04/07/2015 at 07:05PM

25
#155 - talineo / @talineo_

04/10/2015 at 10:13PM

25
#156 - Kamil Laskowski / @laskowskikamil

04/12/2015 at 07:42PM

25
#157 - mx9 / @mutilx9

04/16/2015 at 05:51PM

25
#158 - nulusr / @nulusr

04/21/2015 at 10:54AM

25
#159 - Gracjan Grala / @gracjangrala

04/21/2015 at 11:01PM

25
#160 - mat / @matgeist

05/26/2015 at 05:51PM

25
#161 - Abdo Achkar / @Achkar

08/16/2015 at 02:56PM

25
#162 - Stefan Countryman / @stcountryman

08/19/2015 at 02:45AM

25
#163 - Jesse Atkinson / @jsatk

08/29/2015 at 03:19AM

25
#164 - Alain / @ducouloa

11/29/2015 at 09:05PM

25
#165 - Chenut Ludovic / @7Brwa7

04/01/2016 at 10:38AM

25
#166 - mattp (part of the 💉💉💉 club) / @mattpep

05/17/2016 at 11:17AM

25
#167 - tPenguinLTG / @tpenguinltg

08/16/2016 at 01:45PM

25
#168 - Will / @obiwan__k3n00bi

08/30/2016 at 06:26AM

25
#169 - Jon Louie / @jjisnow

11/23/2016 at 01:31PM

25
#170 - Michał Dytko / @DytkoM

12/22/2016 at 09:31AM

25
#171 - gturri / @g_turri

02/24/2017 at 08:42AM

25
#172 - Brian Hall / @_bruab_

05/12/2017 at 04:47PM

25
#173 - Carl Egbert / @CarlOEgbert

06/13/2017 at 12:36AM

25
#174 - Martin Pedersen / @M4R7iNP

12/29/2017 at 05:33PM

25
#175 - Jonathan Camilleri / @Too_Many_Taken

06/03/2018 at 08:52AM

25
#176 - Ivo Blöchliger / @aigledesalpes

08/13/2019 at 08:12PM

25
#177 - Ariel Miculas / @ArielMiculas

09/24/2019 at 02:51PM

25
#178 - jdfgjhsbd / @bli231957

10/02/2021 at 11:17AM

25
#179 - Giacomo Sansone / @pcineverdies

06/25/2024 at 03:40PM

26
#180 - Kai Yuan / @kentyuan

03/30/2015 at 07:43AM