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):
18
#61 - Jean George / @JeanGeo20504212

12/10/2021 at 02:08PM

18
#62 - MonkieeBoi / @MonkieeBoi

02/09/2024 at 11:42AM

18
#63 - evgenii-kokorin / @evgenii-kokorin

02/17/2024 at 07:01PM

18
#64 - Berel94 / @Berel94

03/20/2024 at 08:42PM

18
#65 - Peppa Pig / @PeppaPigSg

06/28/2024 at 05:31AM

18
#66 - nickGPT / @nickandbro

08/28/2024 at 04:20AM

19
#67 - Garrett Smith / @garrettwhsmith

03/31/2015 at 12:06AM

19
#68 - Mihai / @mihaicristiant

12/13/2018 at 01:09PM

19
#69 - Melvin Cheung / @MelvinCheung

11/12/2019 at 01:33AM

19
#70 - Lory / @Lory46845742

11/15/2019 at 12:47PM

20
#71 - Matt / @mcr05

03/31/2015 at 03:54AM

20
#72 - Boobo / @fcukcat

03/31/2015 at 12:23PM

20
#73 - Mikael Saltzman / @MikaelSaltzman

04/06/2015 at 12:00AM

20
#74 - E Both / @enboth

04/10/2015 at 11:36PM

20
#75 - Koen De Causmaecker / @KoenCaus

04/12/2015 at 08:44PM

20
#76 - Charles Joachim / @cacplate

04/17/2015 at 06:21PM

20
#77 - Daniel Worthington / @halffullheart

05/20/2015 at 02:23AM

20
#78 - Clark DuVall / @theclarkatron

05/26/2015 at 10:31PM

20
#79 - Mutter Mumble / @muttermumble

06/18/2015 at 12:25PM

20
#80 - Peter B / @l0wm4x

08/05/2015 at 08:37PM

20
#81 - LC / @leeren

08/22/2015 at 09:51AM

20
#82 - Dimitar Dimitrov / @kurkale6ka

03/14/2016 at 10:14AM

20
#83 - Andres Araya / @arayaandresfco

05/24/2016 at 03:31AM

20
#84 - Rami Hovi / @hacker_lawyer

05/24/2017 at 12:03AM

21
#85 - Mariano Macchi / @mmacchif

03/30/2015 at 07:55PM

21
#86 - Marcelo Montu / @_mMontu_

04/07/2015 at 07:57PM

21
#87 - we’re going to need a bigger bot / @assaflavie

04/16/2015 at 06:52PM

21
#88 - David Stensland / @DavidStensland

05/26/2015 at 10:41PM

21
#89 - Ferdev vimgolf / @fergvimgolf

08/08/2015 at 05:27AM

21
#90 - Nick Xiao / @nicoster

08/22/2015 at 04:25AM