rainbow icon indicating copy to clipboard operation
rainbow copied to clipboard

Extend '*': 0 by inheriting default options.

Open amerlyq opened this issue 10 years ago • 1 comments

Usecase: I want use plugin only for lisp, vimscript and zsh. If I disable for all by let g:rainbow_conf = {'separately': {'*': 0, 'lisp':{}, ...}}, then I need to copypaste whole definition for vimscript, bloating my vimrc.

Currently there are two possible cases: '*': {} -- apply default config to all filetypes (user's specified and default for plugin) '*': 0 -- don't apply to any, beside specified in user's g:rainbow_conf.separately Therefore there are no case to disable for all types beside user, but inherit all defaults from plugin. Maybe, by specifying '*': 1 we could inherit all default types, but disable for all other filetypes? Then one could disable, as example, only xml and css by inserting '*': 1, 'xml': 0, 'css': 0. And by specifying '*': 0, 'xhtml': 1 one could inherit definitions only for xhtml?

Distinct value 1 is necessary, because we must distinguish cases when we inherit general common profile by 'lisp': {}, or inherit specific default config from plugin by 'lisp': 1. Otherwise we lose ability to overwrite default plugin config by its general settings -- like resetting default values for css: 'css': {}.

amerlyq avatar Nov 26 '15 14:11 amerlyq

A new option "default" is added now.

luochen1990 avatar Jun 03 '18 15:06 luochen1990