57187Re: Progress indicator for :TOhtml command
- Jun 2, 2010On Wed, Jun 2, 2010 at 8:55 AM, Ben Fritz <fritzophrenic@...> wrote:
> It appears I haveFound it. I have the following in my .vimrc:
> something in my Vim setup that slows things down enough, or redraws
> the window, or something, that causes the status lines to appear when
> normally they would not.
> Any ideas? I don't see anything suspicious in my usual Buf/Win Enter/
> Leave autocmds:
" Highlight trailing whitespace, unless it is being entered now
autocmd WinEnter,VimEnter *
\ if !exists('w:created') |
\ call matchadd('WhitespaceError','\S\@<=\s\+\%#\@<!$') |
" necessary to have it highlight a just-entered trailing space
autocmd InsertLeave * redraw!
The InsertLeave command is triggering because 2html works using
normal! a... commands. I have the autocmd because of the following
text in :help /\%# :
WARNING: When the cursor is moved after the pattern was used, the
result becomes invalid. Vim doesn't automatically update the matches.
This is especially relevant for syntax highlighting and 'hlsearch'.
In other words: When the cursor moves the display isn't updated for
this change. An update is done for lines which are changed (the whole
line is updated) or when using the |CTRL-L| command (the whole screen
So anyway, it looks like we need to do the redrawstatus. It would be
easiest to just use redrawstatus! right after calling the incr
function. I wonder how much of a performance impact this has? If it is
significant, we should probably call it only sometimes, perhaps after
a progress bar position update (which would mean the number of
processed lines would not be updated in real-time on large files). Any
It appears we also need to ignore some events; at least BufEnter,
WinEnter, InsertEnter, BufLeave, WinLeave, and InsertLeave. Syntax
seems like a good idea as well, but then we'd want to do the syntax
highlight when done, so perhaps we can leave this one in. Thoughts on
this? Is this really needed as part of the same patch or would this be
a future, performance-enhancing-only, patch?
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
- << Previous post in topic Next post in topic >>