Kakoune: Add a <scope> to colorscheme command

Created on 2 Jun 2017  Â·  6Comments  Â·  Source: mawww/kakoune

Hi

When two clients are connected to the same session, changing the colorscheme in one of them will also impact the other.
I would suggest to add a <scope> flag , with global or window.

This way a user could keep the current behavior with global and have a different colorscheme per client by using window.

Use cases:
When in ide mode with a linter window, a grep window… only set bright color in the window which has focus, and turn the other one darker (with another color scheme).

Most helpful comment

Allowing two clients who code collaboratively to have a different colorscheme would be nice though.

All 6 comments

That would be pretty hard to do on the colorscheme command, which is a small wrapper on top of the source command.

Faces are not scoped at all, they are global values. Changing them to be scoped would be a big change, I am not convinced its worth it. For your use case, rxvt-unicode provides just that, it can fade when not focused, so I dont think its a strong enough case to justify adding all that complexity inside Kakoune.

Allowing two clients who code collaboratively to have a different colorscheme would be nice though.

Another use case is to set custom face to cursor in insert mode. Doing it in ModeChange hook via set-face changes face of cursor in all client connected to session, even those which are still in normal mode.

Another use case is to be able to have a different cursor colour (or a whole theme) when in an insert mode. Right now if I change a cursor or a theme in a ModeChange hook, that change is applied globaly, which is very inconvenient. Also, why is there a need to have separate kind of variables that are not scoped?

Amazing responsiveness! Thank you!

Thanks a lot! :tada:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fennewald picture fennewald  Â·  3Comments

notramo picture notramo  Â·  3Comments

alexherbo2 picture alexherbo2  Â·  3Comments

basbebe picture basbebe  Â·  4Comments

lenormf picture lenormf  Â·  4Comments