-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
-U
flag to def-mode
, to allow disabling fallback text insertion
Sometimes it may be useful to use an existing mode as a fallback, as a succinct way to inherit lots of bindings. However the mode in question may also have text insertion for the Unicode range enabled, which the "parent" mode may want to disable regardless of what the fallback does. Using the `-U` flag is like recursively applying `-u` to all fallback modes, but only in that context (i.e. still working as usual if `-U` isn't used higher up the chain of inheritance). Example use case: def-mode -U pager normal bind -T pager up scroll-up bind -T pager down scroll-down bind -T pager delete '' bind -T pager backspace '' bind -T pager C-e 'mode normal' mode pager This pattern allows defining a mode that overrides just a few bindings from the fallback ("normal") while inheriting most others and overriding the fallback's text insertion flags (force disabling it).
- Loading branch information
1 parent
9ca0720
commit b96e307
Showing
4 changed files
with
35 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters