Re: Should 2html generate valid CSS by default?

2010-07-29 Fir de Conversatie Bram Moolenaar

Benjamin Fritz wrote:

 On Wed, Jul 28, 2010 at 3:39 PM, Bram Moolenaar b...@moolenaar.net wrote:
 
  The documentation clearly 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
 
  We can change that to default to using CSS when the variable isn't set
  and tell users to use this to disable that:
 
:let g:html_use_css = 0
 
  Any problems with that?
 
 
 Well...it would be inconsistent with the other options, which will
 remain enabled even if you :let them to zero. If I change this one, I
 will want to change all options to work the same way. Each would do as
 one might expect when :let to either zero or 1, with a default
 behavior noted in the :help when they are not defined at all.

We also don't want to make it incompatible from previous versions
without a good reason.

Using unlet g:html_use_css to disable using CSS is certainly a bad
idea.  It conflicts with the previous meaning.

Having both a g:html_use_css and g:html_no_css variable gets confusing.
A user may set one and forget about the other, then needs to read
documentation to find out which one prevails.

We should require a variable not only to exist but also be not zero.
I think the documentation already explains it that way.  Some code may
not check the value, there is no real need to change that.

-- 
DENNIS: You can't expect to wield supreme executive power just 'cause some
watery tart threw a sword at you!
 Monty Python and the Holy Grail PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- b...@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///

-- 
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


Re: Should 2html generate valid CSS by default?

2010-07-28 Fir de Conversatie Dennis Benzinger

 Original-Nachricht 
 Datum: Wed, 28 Jul 2010 00:36:10 -0500
 Von: Benjamin Fritz fritzophre...@gmail.com
 An: vim_use vim_...@googlegroups.com, vim_dev vim_dev@googlegroups.com
 Betreff: Should 2html generate valid CSS by default?

 I've taken over as maintainer of the TOhtml plugin during Vim 7.3
 development.
 
 Something that's bugged me a little for some time about 2html, is that
 the current default is to NOT use CSS, but rather use old-style
 font, b, i, and other tags for markup.
 
 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.
 
 A user could still disable this option by unletting it manually, or in
 an after/plugin file.

Would t
 
 I can personally think of no compelling reason not to do this. But, to
 avoid offending a lot of people out of my own ignorance...
 
 Are there any good reasons to keep the default behavior of generating
 markup that does not use basic CSS1? Please respond if you have
 concerns.
 [...]

-- 
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


Re: Should 2html generate valid CSS by default?

2010-07-28 Fir de Conversatie Dennis Benzinger
I'm sorry for the partial mail I sent before!

Hi Benjamin!

 Original-Nachricht 
 Datum: Wed, 28 Jul 2010 00:36:10 -0500
 Von: Benjamin Fritz fritzophre...@gmail.com
 An: vim_use vim_...@googlegroups.com, vim_dev vim_dev@googlegroups.com
 Betreff: Should 2html generate valid CSS by default?

 I've taken over as maintainer of the TOhtml plugin during Vim 7.3
 development.
 
 Something that's bugged me a little for some time about 2html, is that
 the current default is to NOT use CSS, but rather use old-style
 font, b, i, and other tags for markup.
 
 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.
 
 A user could still disable this option by unletting it manually, or in
 an after/plugin file.

Would this unletting work from .vimrc? If not then perhaps creating a new
variable html_no_css would be better. This variable could then be set
from .vimrc.

 I can personally think of no compelling reason not to do this. But, to
 avoid offending a lot of people out of my own ignorance...

As long as it's prominently announced when 7.3 is released I prefer
creating CSS by default.

 Are there any good reasons to keep the default behavior of generating
 markup that does not use basic CSS1? Please respond if you have
 concerns.
 [...]

The only problem I can imagine is that some mail clients (e.g. Outlook)
have problems with CSS in HTML mails.


Regards,
Dennis Benzinger

-- 
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


Re: Should 2html generate valid CSS by default?

2010-07-28 Fir de Conversatie Bram Moolenaar

Benjamin Fritz wrote:

 I've taken over as maintainer of the TOhtml plugin during Vim 7.3 development.
 
 Something that's bugged me a little for some time about 2html, is that
 the current default is to NOT use CSS, but rather use old-style
 font, b, i, and other tags for markup.
 
 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.
 
 A user could still disable this option by unletting it manually, or in
 an after/plugin file.
 
 I can personally think of no compelling reason not to do this. But, to
 avoid offending a lot of people out of my own ignorance...
 
 Are there any good reasons to keep the default behavior of generating
 markup that does not use basic CSS1? Please respond if you have
 concerns.
 
 I do plan to maintain the old non-CSS markup generation, at least to
 some extent. Some features, such as the diff view added in 7.3, will
 be less pretty, and others such as dynamic folding will be completely
 unavailable, but I hope to keep the basic functionality working and
 probably even fix a few existing bugs.

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.

-- 
I've been teaching myself to play the piano for about 5 years and now write
most of my songs on it, mainly because I can never find any paper.
Jeff Lynne, ELO's greatest hits

 /// Bram Moolenaar -- b...@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///

-- 
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


Re: Should 2html generate valid CSS by default?

2010-07-28 Fir de Conversatie Benjamin Fritz
On Wed, Jul 28, 2010 at 10:07 AM, Bram Moolenaar b...@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_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


Re: Should 2html generate valid CSS by default?

2010-07-28 Fir de Conversatie Bram Moolenaar

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.

You should not switch it on, as in assiging a value to the variable.
You can behave that CSS is used when the variable is not set, and when
the variable is set to non-zero non-empty.

 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.

The documentation clearly 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

We can change that to default to using CSS when the variable isn't set
and tell users to use this to disable that:

   :let g:html_use_css = 0

Any problems with that?

-- 
Why I like vim:
 I like VIM because, when I ask a question in this newsgroup, I get a
 one-line answer.  With xemacs, I get a 1Kb lisp script with bugs in it ;-)

 /// Bram Moolenaar -- b...@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///

-- 
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


Re: Should 2html generate valid CSS by default?

2010-07-28 Fir de Conversatie Benjamin Fritz
On Wed, Jul 28, 2010 at 3:39 PM, Bram Moolenaar b...@moolenaar.net wrote:

 The documentation clearly 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

 We can change that to default to using CSS when the variable isn't set
 and tell users to use this to disable that:

   :let g:html_use_css = 0

 Any problems with that?


Well...it would be inconsistent with the other options, which will
remain enabled even if you :let them to zero. If I change this one, I
will want to change all options to work the same way. Each would do as
one might expect when :let to either zero or 1, with a default
behavior noted in the :help when they are not defined at all.

-- 
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


Re: Should 2html generate valid CSS by default?

2010-07-28 Fir de Conversatie Matt Wozniski
On Wed, Jul 28, 2010 at 9:24 PM, Benjamin Fritz fritzophre...@gmail.com wrote:
 On Wed, Jul 28, 2010 at 3:39 PM, Bram Moolenaar b...@moolenaar.net wrote:

 The documentation clearly 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

 We can change that to default to using CSS when the variable isn't set
 and tell users to use this to disable that:

   :let g:html_use_css = 0

 Any problems with that?


 Well...it would be inconsistent with the other options, which will
 remain enabled even if you :let them to zero. If I change this one, I
 will want to change all options to work the same way. Each would do as
 one might expect when :let to either zero or 1, with a default
 behavior noted in the :help when they are not defined at all.

I think that the best choice is just to keep the same option name and
change the behavior when it hasn't been set.  So, if the user sets
html_use_css to 0 in their vimrc, they won't get CSS, and if they have
set it to 1 or haven't set it at all, they'll get CSS.  I can't see
any good reason for adding a second variable, it seems like it would
only complicate things.  I definitely *wouldn't* write it to always be
set to 1 by default - that's too hard to override for users who aren't
intimately familiar with the order in which different vim
initializations happen.  I'd just have the plugin do this when it
runs:

if !exists(g:html_use_css)
  let html_use_css = 1
endif

That way, if the user has set it to anything in his vimrc, the plugin
never needs to do anything.  If he sets it in his gvimrc instead, he
just overwrites the default that the plugin set.

~Matt

-- 
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


Should 2html generate valid CSS by default?

2010-07-27 Fir de Conversatie Benjamin Fritz
I've taken over as maintainer of the TOhtml plugin during Vim 7.3 development.

Something that's bugged me a little for some time about 2html, is that
the current default is to NOT use CSS, but rather use old-style
font, b, i, and other tags for markup.

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.

A user could still disable this option by unletting it manually, or in
an after/plugin file.

I can personally think of no compelling reason not to do this. But, to
avoid offending a lot of people out of my own ignorance...

Are there any good reasons to keep the default behavior of generating
markup that does not use basic CSS1? Please respond if you have
concerns.

I do plan to maintain the old non-CSS markup generation, at least to
some extent. Some features, such as the diff view added in 7.3, will
be less pretty, and others such as dynamic folding will be completely
unavailable, but I hope to keep the basic functionality working and
probably even fix a few existing bugs.

-- 
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