What if they were clickable links with the same highlighting as in Vim? I'd prefer not to add yet another option if I can avoid it.
Yes, that was in there before I took over maintenance.
> I would argue that the link conversion isn't what I'd expect of TOhtml.
> I expected TOhtml to simply convert what I see in vim to HTML - a code
> snippet that can be embedded in a web page, with the possibility of
> copy/paste. (Otherwise, for looks, one could just use a screenshot.)
>
I admit I was a little surprised to see it, but it's been there for a long
time so I'm hesitant to take it out entirely. It is quite jarring to have
the default browser style applied to such links and the Vim style applied
to everything else.
>
> Just applying the vim style to the <a> tag (instead of or in addition
> to an on/off option), I don't think would be that straightforward
> either.
> For example, my style is a purple fg with NO border. The generated vim
> style has no border attribute because normally it doesn't have to
> override a default style with border. You would need a
> "border:none !important". I just tried this on the fly in FF 3.5 +FF
> 9 and the no-border is ignored despite the "!important". It takes the
> colour but still displays with border.
>
>
I haven't see a browser apply a border. Normally they apply an underline,
which can be removed with text-decoration: none; (no !important required).
for me, if i am looking at vim snippets in a browser and there
are links, i would expect to be able to click and go to the
target of the link, and think it odd if it looks like a link but
isn't -- you really want to unlink the links?
sc
There's a good question! It would provide me some insight in maintaining it as well.
I normally use it for one of these reasons:
1. Sharing code snippets which I want to be formatted nicely, e.g. in an email.
2. Sharing a document with a folding structure I want to preserve, useful for calling attention to parts of a file.
3. Sharing a document which I've marked up with an on-the-fly syntax, or for which most editors don't syntax highlight.
4. Showing off!
I've seen it used as the back-end for a syntax-highlighted pastebin:
TOhtml has a lot of options, I'd like to avoid adding more for changes which aren't too jarring. I'm not sure from your statement what you think about links that are:
1. real links
2. normally styled the same as in Vim, i.e. not bright blue and without an underline
3. get a nice blue underline (and maybe text) when ":hover" is active
Probably I could add the underline when it has focus as well for those navigating using the keyboard only or other "non-mouse" browser users.
Would this be a good compromise or do you want your links to stand out all the time?