Thursday, December 31, 2015

Re: When is an xterm's t_Co detected?

On Do, 31 Dez 2015, Gary Johnson wrote:
> That seems like the right thing to do. I'm trying to think of what
> could go wrong. I'm concerned about this statement under ":help
> OptionsSet":
>
> Note: It's a bad idea to reset an option
> during this autocommand, this may break a
> plugin. You can always use `:noa` to prevent
> triggering this autocommand.
>
> I was considering having this autocommand execute a :colorscheme
> {name} command. That would often set 'background'. And if "nested"
> was used, it would trigger a ColorScheme event.

Yes possibly. What was meant with above paragraph was to be prepared
that resetting an option value once OptionSet triggers, might have
unwanted consequences, because usually plugins do set those options for
a reason. Nevertheless, you can do that, and I have already used it to
reset unwanted option values.

That works most of time, if the option is set correctly (and not by just
resetting some flag in the Vim core, which happens e.g. when diff mode
is turned on).

Best,
Christian
--
In der Ehe gilt Verstand (zumal des Weibs) weit mehr als Liebe. Diese
hält nicht lange nach, wird leicht gestört und bringt nie in Ordnung.
Also bildet eure Töchter verständig, nicht bloß liebend.
-- Jean Paul

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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: