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 52552abfb089a00002000007

Create Leading Zeros

Create leading zeros only for id columns. Please use generic approach!

Start file
id	data	age	parent_id
11	"Test"	12	123
123	"Test2	11	null
155	"Test5	19	123
111	"Test"	12	1123
1123	"Test2	11	11
1155	"Test5	19	1123
211	"Test"	12	123
2123	"Test2	11	11
2155	"Test5	19	123
2111	"Test"	12	1123
3123	"Test2	11	11
3155	"Test5	19	1123
1	"root"	9	null
End file
id	data	age	parent_id
0011	"Test"	12	0123
0123	"Test2	11	null
0155	"Test5	19	0123
0111	"Test"	12	1123
1123	"Test2	11	0011
1155	"Test5	19	1123
0211	"Test"	12	0123
2123	"Test2	11	0011
2155	"Test5	19	0123
2111	"Test"	12	1123
3123	"Test2	11	0011
3155	"Test5	19	1123
0001	"root"	9	null

View Diff

2,6c2,6
< 11	"Test"	12	123
< 123	"Test2	11	null
< 155	"Test5	19	123
< 111	"Test"	12	1123
< 1123	"Test2	11	11
---
> 0011	"Test"	12	0123
> 0123	"Test2	11	null
> 0155	"Test5	19	0123
> 0111	"Test"	12	1123
> 1123	"Test2	11	0011
8,10c8,10
< 211	"Test"	12	123
< 2123	"Test2	11	11
< 2155	"Test5	19	123
---
> 0211	"Test"	12	0123
> 2123	"Test2	11	0011
> 2155	"Test5	19	0123
12c12
< 3123	"Test2	11	11
---
> 3123	"Test2	11	0011
14c14
< 1	"root"	9	null
---
> 0001	"root"	9	null

Solutions by @lifepillar:

Unlock 7 remaining solutions by signing in and submitting your own entry
Created by: @robrob12

82 active golfers, 241 entries

Solutions by @lifepillar:
23
#7 - Lifepillar / @lifepillar

06/27/2015 at 02:36PM

24
#>28 - Lifepillar / @lifepillar

06/27/2015 at 02:30PM

26
#>38 - Lifepillar / @lifepillar

06/27/2015 at 02:22PM

27
#>41 - Lifepillar / @lifepillar

06/27/2015 at 02:19PM

40
#>53 - Lifepillar / @lifepillar

06/27/2015 at 02:03PM

47
#>65 - Lifepillar / @lifepillar

06/26/2015 at 05:57PM

48
#>66 - Lifepillar / @lifepillar

06/26/2015 at 05:24PM