Wednesday, July 28, 2010

Re: Should 2html generate valid CSS by default?

On Wed, Jul 28, 2010 at 10:07 AM, Bram Moolenaar <Bram@moolenaar.net> wrote:
>
> Benjamin Fritz wrote:
>
>>
>> The :help says:
>>
>> > By default, HTML optimized for old browsers is generated.  If you prefer using
>> > cascading style sheets (CSS1) for the attributes (resulting in considerably
>> > shorter and valid HTML 4 file), use:
>> >    :let g:html_use_css = 1
>>
>> At this point, I'd consider "old browsers" to be Internet Explorer 6
>> and the like. I think the time has come to default g:html_use_css to
>> true, by including this line in the tohtml.vim plugin file.
>>
>
> The 7.3 release would be a good point to flip the default.  Those who
> use somethink like links to view the HTML will easily see that they need
> to set an option.  While most users don't have a hint that enabling CSS
> will make the output much nicer.
>

So...I've had one person suggest using html_no_css (default off)
instead of html_use_css (default on).

I was intending to keep the current option and just turn it on by
default, so that there were no surprises to people currently using the
option, but I'm not sure whether this is really necessary.

If I keep the existing option, and just turn it on in the plugin, a
user could override it by:

1. using a "-c" command-line option
2. putting a VimEnter autocmd in the .vimrc
3. putting a file in the after/plugin directory
4. manually calling unlet g:html_use_css before generating the html

But this is less convenient than just putting "let g:html_no_css" in the .vimrc.

I would like to avoid that someone who has g:html_use_css in their
.vimrc gets surprised when they unlet the variable and nothing
happens. I'm leaning toward using both options, defaulting
g:html_use_css to true, and overriding it if g:html_no_css is set. I
could certainly be convinced to use just one or the other if there are
good reasons to do so.

--
You received this message from the "vim_use" 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

No comments: