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

73426Re: [patch] colorscheme autocommand should match against the colorscheme name

Expand Messages
  • ZyX
    Sep 28, 2013
      > I suppose the ColorScheme event is most useful to make highlight changes
      > after loading a color scheme. This depends on the color scheme, but
      > may also depend on the syntax.
      >
      > This change is not backwards compatible, does that matter?

      I do not think so. I cannot imagine why somebody may want to match file name in Colorscheme or Vim(Enter|Leave.*) events knowing that there may be more then one file opened. But if one still needs to match he may use usual “expand('%:p')=~#regex” condition which will work for both Vims, with or without this patch.

      > What are people actually using the ColorScheme event for?

      Almost all color schemes clear all highlighting (i.e. with :hi clear). This means that if you define your own highlighting group you must hook this event to redefine it after color scheme was loaded. E.g. powerline is using this as it defines a big bunch of Pl_* groups for statusline highlighting. I believe other statusline plugins have to do the same.

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

      ---
      You received this message because you are subscribed to the Google Groups "vim_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Show all 5 messages in this topic