Zvi Har'El wrote:

I tried to use view with the 'man' syntax, for example on the file vimtutor.man
obtained by

   GROFF_NO_SGR=y groff -Tascii -man $(man -w vimtutor) > vimtutor.man

(see http://www.math.technion.ac.il/~rl/etc/vimtutor.man)
(this is not the file vimtutor.man in the vim distribution - the latter
doesn't include embedded backspaces).

I have the following problem: while the character before an embedded backspace
is ignored (sort of: it is colored white), the backspace is printed as a ^H.
I would expect the two characters to be skipped all together. (snip)


Why would you expect that? Syntax highlighting is highlighting, not inline folding. Vim doesn't support inline folding. Vince Negri has provided a patch to vim's source (http://vince.negri.googlepages.com/) which permits inline folding, though. I've used that feature in AnsiEsc (http://vim.sourceforge.net/scripts/script.php?script_id=302) which highlights text using Ansi Escape sequences (while suppressing the escape sequences themselves).

However, it is unrealistic to expect that man.vim would support Negri's unofficial patch; in fact, there's not many scripts that do. One natural use for such a feature would be to allow LaTeX files to be displayed using its embedded directives while suppressing the directives themselves, which would make for nice LaTeX editing.

Unfortunately, IMHO, inline folding didn't get enough votes during vim 7.0's development, and Bram is uncomfortable with the idea of inline folding because it, naturally enough, suppresses information (Vince's patch typically folds all lines but the current one). At least, that's how I understand the state of things.

Regards,
Chip Campbell

Reply via email to