>>>Well,
>>>:g/^\(.\{8}\)\(.*\)\n\(\s{8}\)/s//\1\2\r\1/
>>> ^
>>>works, but I'd have to run it 12 times if there are twelve blanks
>>>after the filled in line.
>>Hm? Not sure why you escaped the '{'. Apparently didn't need to
>>after
>>the "\s".
>You are right - it was a typo - I actual
:g/^\s\{8}/-s/^\(.\{8}\).*\n\zs\s\{8}/\1
I don't understand that regex completely - but it deletes
lines of data :-)
Looks like it globably matches the 'blank start' lines, then
searches in that for the pattern - thus deleting the third
line...
That's really odd...the "\zs" *should* be forcin
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 16-May-07, at 2:27 PM, Tim Chase wrote:
:g/^\s\+/k a|?^\S?y|'a|s/^\s\+/\=strpart(@", 0, strlen(submatch(0)))
That works dunno what it does... but that works :-)
I'm going to record that little gem, and put it aside for a bedtime
pu
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 16-May-07, at 2:23 PM, Gene Kwiecinski wrote:
:g/^\(.{8}\)\(.*\)\n\(\s{8}\)/s//\1\2\r\1/
Well,
:g/^\(.\{8}\)\(.*\)\n\(\s{8}\)/s//\1\2\r\1/
^
works, but I'd have to run it 12 times if there are twelve blanks
after the filled in line.
I'm trying to work out if it's possible to refer to 'the previous
line' in a regex.
e.g. if the first 8 characters of a line are blank,
^\s{8}
replace them with the 8 characters at the start of the previous line.
Ideally it would handle a line a time, thus multiple blank line
starts wou
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 16-May-07, at 1:05 PM, Tim Chase wrote:
:g/^\s\{8}/-s/^\(.\{8}\).*\n\zs\s\{8}/\1
I don't understand that regex completely - but it deletes lines of
data :-)
Looks like it globably matches the 'blank start' lines, then searches
in that for
>>:g/^\(.{8}\)\(.*\)\n\(\s{8}\)/s//\1\2\r\1/
>Well,
>:g/^\(.\{8}\)\(.*\)\n\(\s{8}\)/s//\1\2\r\1/
>^
>works, but I'd have to run it 12 times if there are twelve blanks
>after the filled in line.
Hm? Not sure why you escaped the '{'. Apparently didn't need to after
the "\s".
>I suppos
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 16-May-07, at 12:49 PM, Gene Kwiecinski wrote:
:g/^\(.{8}\)\(.*\)\n\(\s{8}\)/s//\1\2\r\1/
Well,
:g/^\(.\{8}\)\(.*\)\n\(\s{8}\)/s//\1\2\r\1/
^
works, but I'd have to run it 12 times if there are twelve blanks
after the filled in line