Loading ...
Sorry, an error occurred while loading the content.

Re: new color schemes ...

Expand Messages
  • Bram Moolenaar
    ... It would be possible that :hi clear loads the defaults, after clearing everything. There is the danger that when a new group is added to the default,
    Message 1 of 8 , May 2, 2001
    • 0 Attachment
      Ron Aaron wrote:

      > Looking at 'elflord' for example, it simply doesn't set hlsearch at all.
      > Shouldn't it be the case that after a 'hi clear' we should be back to the
      > 'default' settings? Or at least, 'hi default *' or something similar.

      It would be possible that ":hi clear" loads the defaults, after clearing
      everything. There is the danger that when a new group is added to the
      default, the color file doesn't change it and it will look ugly. But not
      having any highlighting is probably worse.

      Alternative: put this line at the top of the color scheme script, instead of
      the ":hi clear":

      colors default

      Disadvantage: For the groups that you change the colors for must set _all_
      colors. You can't set only the background, because the default may have set a
      foreground to an unknown color.

      For example, the "morning" scheme currently contains:

      hi ModeMsg term=bold cterm=bold gui=bold

      When starting with the default colors instead of nothing, it should be changed
      to:

      hi ModeMsg term=bold cterm=bold ctermfg=NONE ctermbg=NONE gui=bold guifg=NONE guibg=NONE

      > The problem seems to be that after 'hi clear', all highlighting is completely
      > gone, so we have to set all highlight groups again. Really what most people
      > want is to tweak this or that setting, and not to care about *every* possible
      > highlight group -- especially when we add new ones, then every script has to
      > change.

      That is unavoidable. If a new group is added, for example like when Diff
      groups were added, it often depends on the other colors. Not setting it will
      make the highlighting look wrong.

      > My old scripts for the color schemes set a 'default' color scheme; this
      > worked, but also had to be updated every time a new hi group turned up. Very
      > messy. Not that I'm complaining or anything ...

      The maintainer should be prepared to do maintenance on the color schemes.
      It's not difficult to add a line to the file.

      --
      Give a man a computer program and you give him a headache,
      but teach him to program computers and you give him the power
      to create headaches for others for the rest of his life...
      R. B. Forest

      /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
      ((( Creator of Vim - http://www.vim.org -- ftp://ftp.vim.org/pub/vim )))
      \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
    • Ron Aaron
      ... Personally, I think this is the correct behaviour, since it is hard to imagine a situation where really having *no* highlighting at all is useful. ...
      Message 2 of 8 , May 2, 2001
      • 0 Attachment
        Bram Moolenaar <Bram@...> writes:
        >Ron Aaron wrote:
        >> Shouldn't it be the case that after a 'hi clear' we should be back to the
        >> 'default' settings?
        >
        >It would be possible that ":hi clear" loads the defaults, after clearing
        >everything. There is the danger that when a new group is added to the
        >default, the color file doesn't change it and it will look ugly. But not
        >having any highlighting is probably worse.

        Personally, I think this is the correct behaviour, since it is hard to imagine
        a situation where really having *no* highlighting at all is useful.

        >Alternative: put this line at the top of the color scheme script, instead of
        >the ":hi clear":
        >
        > colors default
        >
        >Disadvantage: For the groups that you change the colors for must set _all_
        >colors. You can't set only the background, because the default may have set a
        >foreground to an unknown color.

        Also, it doesn't work without a 'default.vim' in the colors directory! And
        too, it would be more time consuming that just setting the colors in code
        (but it would be much more flexible for you to change systemwide defaults.

        Best regards,
        Ron
      • Bram Moolenaar
        ... True, an ugly color is better than no color. ... Well, since it s not really a _huge_ change (see below), I ll make :hi clear reset everything to the
        Message 3 of 8 , May 2, 2001
        • 0 Attachment
          Ron Aaron wrote:

          > >> Shouldn't it be the case that after a 'hi clear' we should be back to the
          > >> 'default' settings?
          > >
          > >It would be possible that ":hi clear" loads the defaults, after clearing
          > >everything. There is the danger that when a new group is added to the
          > >default, the color file doesn't change it and it will look ugly. But not
          > >having any highlighting is probably worse.
          >
          > Personally, I think this is the correct behaviour, since it is hard to
          > imagine a situation where really having *no* highlighting at all is useful.

          True, an ugly color is better than no color.

          > >Alternative: put this line at the top of the color scheme script, instead of
          > >the ":hi clear":
          > >
          > > colors default
          > >
          > >Disadvantage: For the groups that you change the colors for must set _all_
          > >colors. You can't set only the background, because the default may have set a
          > >foreground to an unknown color.
          >
          > Also, it doesn't work without a 'default.vim' in the colors directory! And
          > too, it would be more time consuming that just setting the colors in code
          > (but it would be much more flexible for you to change systemwide defaults.

          Well, since it's not really a _huge_ change (see below), I'll make ":hi clear"
          reset everything to the default colors. The default.vim script can use this,
          also to make sure that it's really equal to the startup colors. You lose the
          example file then...

          *** syntax.c~ Tue May 1 17:37:37 2001
          --- syntax.c Wed May 2 19:30:44 2001
          ***************
          *** 6011,6020 ****
          if (ends_excmd(*line))
          {
          /*
          ! * clear all highlight groups
          */
          for (idx = 0; idx < highlight_ga.ga_len; ++idx)
          highlight_clear(idx);
          #ifdef FEAT_GUI
          if (gui.in_use)
          highlight_gui_started();
          --- 6011,6021 ----
          if (ends_excmd(*line))
          {
          /*
          ! * Clear all highlight groups and load the defaults.
          */
          for (idx = 0; idx < highlight_ga.ga_len; ++idx)
          highlight_clear(idx);
          + init_highlight(TRUE);
          #ifdef FEAT_GUI
          if (gui.in_use)
          highlight_gui_started();

          --
          hundred-and-one symptoms of being an internet addict:
          45. You buy a Captain Kirk chair with a built-in keyboard and mouse.

          /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
          ((( Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim )))
          \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
        Your message has been successfully submitted and would be delivered to recipients shortly.