On Wed, October 27, 2010 12:54 pm, Ingo Karkat wrote:
> On 27-Oct-2010 10:48, Marc Weber wrote:
>> I'd like to append lines to background buffers. Which is the best way
>> to do it?
>>
>> 5 choices come to my mind: a) use python. It can do it b) use bufdo (??)
>> and a if bufnr == target then append() endif hack c) sp the buf, append,
>> close (bad?, will cause much redrawing) d) Delay adding lines. Use
>> setbufvar to keep a list of lines to be added. Add them on bufenter
>> event when buffer is shown anyway e) extend append and more functions so
>> that you can pass a bufnr ?
>
> To me, c) is the most straightforward choice. Maybe temporary
> 'lazyredraw' can help with the screen updates. a) is least favorable due
> to the dependency to the language runtime. (But read on, I'll later
> contradict myself!)
I agree.
>> I"d like to help making the asystem patch more usable. And appending
>> lines to buffers is essential.
That would be an interesting option. I haven't had time to try the patch
out. Have you used it?
> My point: Having an enhanced getline({lnum} [, {end} [, {bufnr}]])
> function would certainly have helped, but still use of Ex and normal mode
> commands would be precluded. Some functions like search() would be
There is already a getbufline() function available, so I would expect a
setbufline() function as well. Asynchronous functions would be nice for
monitoring logfiles but I guess, this functionality won't be included soon
in Vim
regards,
Christian
--
You received this message from the "vim_dev" 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