57166Re: Progress indicator for :TOhtml command
- May 31, 2010On 1 June 2010 04:47, Benjamin Fritz <fritzophrenic@...> wrote:
> I love using the :TOhtml command, and I keep finding more ways to useI tried it on Windows, and the display was too flashy and intrusive.
> it. Recently, I had a large-ish log file (several thousand lines), in
> which I wanted to call attention to a few groups of lines, but I
> figured people may want the context as well. So, I set up some folds
> and some quick syntax highlighting, and went to go create an html copy
> of it using the "dynamic folding" feature of the command.
> Unfortunately, I discovered that processing such a large file, even
> with no syntax highlighting, takes a *very* long time. I probably
> should have selected just a smaller area of interest but...
> I waited quite a while, and finally hit CTRL-C to stop it. Luckily it
> hadn't actually gotten that far (probably about 30%), but I was
> worried that it may have been almost done, and all I needed to do was
> wait a bit longer.
> So anyway, for future use, I wanted to be able to see quickly whether
> the conversion was worth waiting for. Therefore, I have written a
> patch to add a progress indicator. When I opened the file, I noticed
> that indentation is quite a mess (a mix of tabs and spaces, sometimes
> in the same line), so I also fixed that up (by using gg=G with noet,
> sw=2, sts=2, and ts=2). For clarity, I ran the diff on the file
> *after* fixing the ident.
> Since the indentation patch is actually *larger* than the file itself,
> I have just attached the fully patched file instead of a patch. This
> will also make it easier for Windows users to try :-)
> Please comment...especially if you know of a better way to accomplish
> something similar. I tried using :echon to draw the progress bar, but
> the echo was being cleared each time through the main loop, so I
> switched to using :echo with a string that is gradually built as the
> script processes.
I can't say I like it.
And there was nothing to "fix" about the tabs. They were perfectly
fine. Tabstop was set to the default (8), and only shiftwidth was set
to 2 (along with sts, which does not affect the saved file). You
seemed to have confused them. The original version is easier to view
(using type/cat/more/less or nearly anything).
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 >>