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):
25
#151 - Abdo Achkar / @Achkar

08/16/2015 at 02:56PM

25
#152 - Stefan Countryman / @stcountryman

08/19/2015 at 02:45AM

25
#153 - Jesse Atkinson / @jsatk

08/29/2015 at 03:19AM

25
#154 - Alain / @ducouloa

11/29/2015 at 09:05PM

25
#155 - Chenut Ludovic / @7Brwa7

04/01/2016 at 10:38AM

25
#156 - some call me mattp / @mattpep

05/17/2016 at 11:17AM

25
#157 - tPenguinLTG / @tpenguinltg

08/16/2016 at 01:45PM

25
#158 - Will / @obiwan__k3n00bi

08/30/2016 at 06:26AM

25
#159 - Jon Louie / @jjisnow

11/23/2016 at 01:31PM

25
#160 - Michał Dytko / @DytkoM

12/22/2016 at 09:31AM

25
#161 - gturri / @g_turri

02/24/2017 at 08:42AM

25
#162 - Brian Hall / @_bruab_

05/12/2017 at 04:47PM

25
#163 - Carl Egbert / @CarlOEgbert

06/13/2017 at 12:36AM

25
#164 - Martin Pedersen / @M4R7iNP

12/29/2017 at 05:33PM

25
#165 - Jonathan Camilleri / @Too_Many_Taken

06/03/2018 at 08:52AM

25
#166 - Ivo Blöchliger / @aigledesalpes

08/13/2019 at 08:12PM

25
#167 - Ariel Miculas / @ArielMiculas

09/24/2019 at 02:51PM

26
#168 - Kai Yuan / @kentyuan

03/30/2015 at 07:43AM

26
#169 - James / @Dronak

03/30/2015 at 02:32PM

26
#170 - cg.sg.im / @CoGe_StGa_idma

03/31/2015 at 12:16AM

26
#171 - 借猫@がんばるん / @RentalCat__

04/02/2015 at 10:31AM

26
#172 - johannes err / @into_the_beta

04/05/2015 at 02:46PM

26
#173 - Josh Hartigan / @joshhartigan

04/07/2015 at 03:14PM

26
#174 - Jota / @rjjota

04/08/2015 at 05:22AM

26
#175 - Michael Cramer / @mlcramer

04/11/2015 at 03:35AM

26
#176 - Joshua Simmons / @MmnJoshua

04/15/2015 at 06:19AM

26
#177 - Ducky / @MegaDucky9000

04/15/2015 at 01:48PM

26
#178 - Amar Battulga / @amar_battulga

04/18/2015 at 03:40PM

26
#179 - Nathan LaVeck / @nslaveck

04/20/2015 at 02:29AM

26
#180 - Notifications / @Notifications_m

04/20/2015 at 09:23PM