Tuesday, June 1, 2010

Re: Progress indicator for :TOhtml command

On May 31, 11:11 pm, "Christian J. Robinson" <hept...@gmail.com>
wrote:
> On Tue, 1 Jun 2010, Yongwei Wu wrote:
> > I tried it on Windows, and the display was too flashy and intrusive.
> > I can't say I like it.


On May 31, 11:11 pm, "Christian J. Robinson" <hept...@gmail.com>
wrote:
> I would be for having a progress meter, if it could be implemented in
> a better way without slowing the script down.
>
> My best suggestion is just to output one line every 5 to 10 percent
> through processing with the current progress, e.g.:
>
>   0%
>   5%
>   10%
>   15%
>   [...]
>   95%
>   Done
>

Hmm, strange. I did not notice a slow-down from the original script,
but then I also set 'nomore' and fdm=manual as a way to speed things
up a little in addition to the progress bar changes. On my dinosaur of
a computer, processing 2html.vim took about 40 seconds LESS with the
patched version that with the unpatched version, according to the
before/after times returned by localtime(). What did you do to see the
slowdown?

I also dislike the flashiness, but couldn't find a way around it. The
echo'd text gets cleared every pass through the main processing loop.
For this reason, a periodic (5, 10, 20%, etc.) message wasn't going to
work. I would certainly prefer this method...my first attempt used
echon to display one "tick" every few lines processed (a tick being
calculated to almost fill the current &columns setting). Does someone
have an idea of how I might accomplish this?

--
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:

Post a Comment