Friday, August 26, 2011

Re: display faster output of external app

On 26 août, 21:41, ZyX <zyx....@gmail.com> wrote:
> 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 _


I am french and don't now injections but I am trying your second expr
even if it is more complex to understand.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: