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):
19
#61 - Mihai / @mihaicristiant

12/13/2018 at 01:09PM

19
#62 - Melvin Cheung / @MelvinCheung

11/12/2019 at 01:33AM

19
#63 - Lory / @Lory46845742

11/15/2019 at 12:47PM

20
#64 - Matt / @mcr05

03/31/2015 at 03:54AM

20
#65 - Boobo / @fcukcat

03/31/2015 at 12:23PM

20
#66 - Mikael Saltzman / @MikaelSaltzman

04/06/2015 at 12:00AM

20
#67 - E Both / @enboth

04/10/2015 at 11:36PM

20
#68 - Koen De Causmaecker / @KoenCaus

04/12/2015 at 08:44PM

20
#69 - Charles Joachim / @cacplate

04/17/2015 at 06:21PM

20
#70 - Daniel Worthington / @halffullheart

05/20/2015 at 02:23AM

20
#71 - Clark DuVall / @theclarkatron

05/26/2015 at 10:31PM

20
#72 - Mutter Mumble / @muttermumble

06/18/2015 at 12:25PM

20
#73 - Peter B / @l0wm4x

08/05/2015 at 08:37PM

20
#74 - LC / @leeren

08/22/2015 at 09:51AM

20
#75 - Dimitar Dimitrov / @kurkale6ka

03/14/2016 at 10:14AM

20
#76 - Andres Araya / @arayaandresfco

05/24/2016 at 03:31AM

20
#77 - Rami Hovi / @hacker_lawyer

05/24/2017 at 12:03AM

21
#78 - Mariano Macchi / @mmacchif

03/30/2015 at 07:55PM

21
#79 - Marcelo Montu / @_mMontu_

04/07/2015 at 07:57PM

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

04/16/2015 at 06:52PM

21
#81 - David Stensland / @DavidStensland

05/26/2015 at 10:41PM

21
#82 - Ferdev vimgolf / @fergvimgolf

08/08/2015 at 05:27AM

21
#83 - Nick Xiao / @nicoster

08/22/2015 at 04:25AM

21
#84 - Paulo Romeira / @pauloromeira

08/24/2015 at 03:22AM

21
#85 - Dinesh Bhosale / @MrDineshBhosale

04/01/2016 at 02:20PM

21
#86 - Yudi Matsuzake / @yudimatsuzake

06/22/2016 at 04:01PM

22
#87 - Michi Loro / @michiloro

04/06/2015 at 11:57AM

22
#88 - Liam Thurston / @lthurston188

08/18/2015 at 12:15AM

22
#89 - Smylers / @Smylers2

01/29/2016 at 02:40PM

22
#90 - André Peric Tavares / @AndrePeric

07/24/2016 at 10:56PM