Problems with ASCII art in Vim help files

110 views
Skip to first unread message

Carlo

unread,
Nov 1, 2010, 6:04:53 PM11/1/10
to vim_dev
There are a couple of places in the Vim help files where ASCII art is
used which interacts in a bad way with the interpretation of pipe
characters. The ones I've noticed are gui.txt around line 170 and
quotes.txt around line 270. In both cases, some of the pipe symbols
are interpreted as delimiters of links. Concealing the pipe symbols
makes it worse.

An easy way around this would be to mark the whole ASCII art as an
"example". Perhaps a better way would be to introduce a new syntax
element which simply turns off interpretation of help syntax; in other
words, an "example" region except that it is not displayed in blue.
Does anyone have any other ideas?

Carlo

Tony Mechelynck

unread,
Nov 2, 2010, 5:38:23 AM11/2/10
to vim...@googlegroups.com, Carlo

I happen to be immune to the "conceal" problem because quite some time
ago I decided that I preferred the "old-style" links, showing the bars:

" do not make help bars and stars invisible
hi clear helpBar
hi link helpBar helpHyperTextJump
hi clear helpStar
hi link helpStar helpHyperTextEntry

...and I don't use the conceal option ('conceallevel' remains at its
default of zero). Of course this might not suit you.

Why not turn it blue? These are, after all, "illustrations", and not
meant to be shown in polychrome; blue-on-white is just as good for them
(IMHO) as black-on-white.

Best regards,
Tony.
--
You're never too old to become younger.
-- Mae West

Dominique Pellé

unread,
Nov 2, 2010, 11:21:49 PM11/2/10
to vim...@googlegroups.com
Carlo wrote:

The other places where I notice that conceal messes up
alignment in help files are:

:help gui-scrollbars
:help netrw-externapp
:help netrw-browser-options
:help tar-options

I see that some ASCII arts are already marked as helpExample
at least in ":help window-contents".

Regards
-- Dominique

Bram Moolenaar

unread,
Nov 3, 2010, 10:35:53 AM11/3/10
to Dominique Pellé, vim...@googlegroups.com

Dominique Pelle wrote:

I prefer to separate commands from other things. ASCII graphics are not
commands, I think it's better to highlight them differently. Or not at
all.

--
TALL KNIGHT: We are now no longer the Knights Who Say Ni!
ONE KNIGHT: Ni!
OTHERS: Sh!
ONE KNIGHT: (whispers) Sorry.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Bram Moolenaar

unread,
Nov 3, 2010, 10:35:54 AM11/3/10
to Carlo, vim_dev

Carlo Teubner wrote:

I think it's best to make an item helpGraphic. Like with helpHeader it
can be recognized by a special character at the end of the line. A
backtick perhaps?

syn match helpGraphic ".* \ze`$" nextgroup=helpIgnore

I made the change for the two places you mention. Any others?

There was one place where a backtick would disappear, I removed the
space before it.

--
ARTHUR: Did you say shrubberies?
ROGER: Yes. Shrubberies are my trade. I am a shrubber. My name is Roger
the Shrubber. I arrange, design, and sell shrubberies.

Reply all
Reply to author
Forward
0 new messages