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 54a480bb5db1600002939b54

increment by column in XML

modify an arbitrary "column" in an xml table by incrementing a an arbitrary placeholder string

Start file
<root>
  <row>
    <alpha>mail</alpha>
    <bravo>@@@@@</bravo>
  </row>
  <row>
    <alpha>male</alpha>
    <bravo>@@@@@</bravo>
  </row>
  <row>
    <alpha>mayel</alpha>
    <bravo>@@@@@</bravo>
  </row>
  <row>
    <alpha>mahel</alpha>
    <bravo>@@@@@</bravo>
  </row>
</root>
End file
<root>
  <row>
    <alpha>mail</alpha>
    <bravo>10000</bravo>
  </row>
  <row>
    <alpha>male</alpha>
    <bravo>10001</bravo>
  </row>
  <row>
    <alpha>mayel</alpha>
    <bravo>10002</bravo>
  </row>
  <row>
    <alpha>mahel</alpha>
    <bravo>10003</bravo>
  </row>
</root>

View Diff

@@ -1,18 +1,18 @@
 <root>
   <row>
     <alpha>mail</alpha>
-    <bravo>@@@@@</bravo>
+    <bravo>10000</bravo>
   </row>
   <row>
     <alpha>male</alpha>
-    <bravo>@@@@@</bravo>
+    <bravo>10001</bravo>
   </row>
   <row>
     <alpha>mayel</alpha>
-    <bravo>@@@@@</bravo>
+    <bravo>10002</bravo>
   </row>
   <row>
     <alpha>mahel</alpha>
-    <bravo>@@@@@</bravo>
+    <bravo>10003</bravo>
   </row>
-</root>
+</root>
\ No newline at end of file

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 33 remaining solutions by signing in and submitting your own entry
#34 Robert Siemieniec / rsiemieniec - Score: 27 - 01/19/15 @ 10:14
q1/@<CR>5s10000<Esc>q@1<C-A>@12<C-A>@13<C-A>ZZ

0 comments

#35 James / Dronak - Score: 27 - 02/08/15 @ 14:47
:%s/@@@@@/10000<CR>3<C-A>4k2<C-A>4k<C-A>ZZ

0 comments

#36 Grisha Pushkov / readoonly - Score: 28 - 01/01/15 @ 18:08
i4<Esc>xqq?@<CR>p5hr1l4r0x<C-X>ylq3@qZZ

0 comments

#37 Lieven Keersmaekers / LievenKeersmaek - Score: 29 - 01/03/15 @ 11:53
:%s;@\+;\=line('.')/<k4>+<k9><k9><k9><k9><CR>ZZ

0 comments

#38 Raynard, Jordan / raynard_jordan - Score: 31 - 01/15/15 @ 02:51
:%s/@/1<CR>:<Up><BS>0/g<CR>8k4wh<C-A>4j<C-A><C-A>4j3<C-A>ZZ

0 comments

#39 ɐʇnɥsɐpoʇ / todashuta - Score: 32 - 03/26/15 @ 06:35
:%s/@@@@@/10000/g<CR>3<C-A>/\d<<CR>n<C-A>n2<C-A>ZZ

0 comments

#40 Mauro Persano / fzort - Score: 44 - 06/05/15 @ 23:14
/@<CR>ct<10000<Esc>nct<10001<Esc>nct<10002<Esc>nct<10003<Esc>ZZ

0 comments

#41 Formally Dallin / FormallyDallin - Score: 46 - 03/24/15 @ 21:54
:%s/@@@@@/10000/g<CR><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right>r3<Up><Up><Up><Up>r2<Up><Up><Up><Up>1r1ZZ

0 comments

#42 luffy / raxcoi - Score: 49 - 01/08/15 @ 11:07
:let @a=10000|%s/@@@@@/\=@a+setreg('a', @a+1)/<CR>ZZ

0 comments

Created by: dreftymac

42 active golfers, 119 entries

Leaderboard (lowest score wins):
19
#1 - Jon Krause / jkrause314

01/20/2016 at 10:42PM

20
#2 - Urtica dioica / udioica

01/01/2015 at 07:54AM

20
#3 - Petro Тrouq / zulolosi

01/01/2015 at 11:15AM

20
#4 - Kai Yuan / kentyuan

01/01/2015 at 08:55PM

20
#5 - Pavlo Klets / p01nt

01/01/2015 at 10:43PM

20
#6 - Jake Eskel / JakeEskel

01/02/2015 at 04:46AM

20
#7 - John Braxler / braxler

01/02/2015 at 02:15PM

20
#8 - Maximiliano Padulo / mpadulo

01/02/2015 at 08:59PM

20
#9 - Piotr G. / gbdlin

01/03/2015 at 04:14PM

20
#10 - Jordana Lachow / TomofBedlam

01/04/2015 at 02:40AM

20
#11 - kimber gonzalez / kimberlycreates

01/07/2015 at 03:07PM

20
#12 - kobby / _kafdot_

01/13/2015 at 11:05PM

20
#13 - Charles H. Leggett / cleggett

01/15/2015 at 01:33PM

20
#14 - Carlos A Henríquez Q / lagunex

01/16/2015 at 05:47PM

20
#15 - mark0829 / mark0829

01/25/2015 at 01:17PM

20
#16 - pftb12345 / pftb12345

04/09/2015 at 02:14PM

20
#17 - Joey / joeyism101

09/11/2015 at 02:10AM

20
#18 - Walker Boh / walker_boh

10/16/2015 at 10:46AM

21
#19 - Matthieu Crapet / mcr05

01/01/2015 at 01:37PM

21
#20 - xieyh11 / xieyh11

02/26/2015 at 09:39AM

22
#21 - YAMADA Yukimi / edp02

01/01/2015 at 08:46AM

22
#22 - mnx / mnxx

01/02/2015 at 08:43AM

22
#23 - .さとうにるぽ引退.swp / nillpo

01/05/2015 at 06:38AM

24
#24 - Michi Loro / michiloro

01/02/2015 at 07:42AM

25
#25 - Robbie Clarken / robbieclarken

01/02/2015 at 03:50AM

25
#26 - )ouni|(antola / jouni_kantola

01/28/2015 at 04:26PM

26
#27 - Eric Biven / EricBiven

12/31/2014 at 11:56PM

26
#28 - chaac / davidmh

01/01/2015 at 01:03AM

26
#29 - kawas / kawas44

01/01/2015 at 02:17PM

26
#30 - Paul / paxlzi

01/01/2015 at 06:49PM

26
#31 - Russell Ball / rtball2

01/01/2015 at 11:46PM

27
#32 - Gwilym Kuiper / gwilymk

01/04/2015 at 01:48PM

27
#33 - Oliver Christ / 0liverChrist

01/11/2015 at 10:55PM

27
#34 - Robert Siemieniec / rsiemieniec

01/19/2015 at 10:14AM

27
#35 - James / Dronak

02/08/2015 at 02:47PM

28
#36 - Grisha Pushkov / readoonly

01/01/2015 at 06:08PM

29
#37 - Lieven Keersmaekers / LievenKeersmaek

01/03/2015 at 11:53AM

31
#38 - Raynard, Jordan / raynard_jordan

01/15/2015 at 02:51AM

32
#39 - ɐʇnɥsɐpoʇ / todashuta

03/26/2015 at 06:35AM

44
#40 - Mauro Persano / fzort

06/05/2015 at 11:14PM

46
#41 - Formally Dallin / FormallyDallin

03/24/2015 at 09:54PM

49
#42 - luffy / raxcoi

01/08/2015 at 11:07AM