Friday, August 26, 2011

Re: display faster output of external app

Reply to message «Re: display faster output of external app»,
sent 23:29:40 26 August 2011, Friday
by niva:

> I have modified with your substitute command like that
>
> exe 's/value.*\|$/ '.g:output.'/'
You like code injections? Try my second suggestion:

let [d, before, after; d2]=matchlist(getline('.'),
\'\v^(\s*\S{,'.s:maxlinelength.'})(\S*)')
call setline('.', before.' '.g:output.after)
. There is an inconvenience though: if g:output is multiline you have to write

let [d, before, after; d2]=matchlist(getline('.'),
\'\v^(\s*\S{,'.s:maxlinelength.'})(\S*)')
let lines=split(g:output, "\n", 1)
let lines[0]=before.' '.lines[0]
let lines[-1].=after
call append('.', lines)
.delete _

Original message:
> I have modified with your substitute command like that
>
> exe 's/value.*\|$/ '.g:output.'/'
>
> It works well but in my previous func, I started to write the new
> ouput at the .s:maxlinelength column number.
>
> How can I d the substitute command and at the same time begin to write
> g:output at the .s:maxlinelength' column number ?
>
> Thanks

No comments:

Post a Comment