RedditPP Mascot

RedditPP

r/vim • … • u/thaynem

Is there a way to create a custom option?

The usual way to configure plugins is by setting variables. However, variables have a disadvantage compared to vim options: they are either global or local, you can't have a global variable that can be overridden for specific buffers or windows.

I could of course use separate "g" and "b" scoped variables, but that feels hacky and kind of complicated. A plugin or library could probably implement something like that using maps for global and buffer or window local variables, but then you have a dependency on that library or plugin.

Is there any built-in functionality that provides similar behavior for making a configuration point for plugins?

— 0