diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-01-12 15:48:17 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-01-13 21:38:19 +0100 |
| commit | 11ede8254974aba6e1ef318ab90374fb85e6bf5c (patch) | |
| tree | 248276ff41ce2efe9bc0280e54905dc977a45c6d /vis.h | |
| parent | 24bf7a500ecad7091f92cf9063d0b6cbbf678db1 (diff) | |
| download | vis-11ede8254974aba6e1ef318ab90374fb85e6bf5c.tar.gz vis-11ede8254974aba6e1ef318ab90374fb85e6bf5c.tar.xz | |
vis: cleanup key binding definitions
This removes the tree based mode structures and instead merges
all keybindings in flat modes which uses some more memory but
will allow (per mode) run-time configurable key bindings.
Make sure to update/remove config.h.
Diffstat (limited to 'vis.h')
| -rw-r--r-- | vis.h | 12 |
1 files changed, 2 insertions, 10 deletions
@@ -120,15 +120,10 @@ void vis_die(Vis*, const char *msg, ...) __attribute__((noreturn)); /* user facing modes are: NORMAL, VISUAL, VISUAL_LINE, INSERT, REPLACE. * the others should be considered as implementation details (TODO: do not expose them?) */ enum VisMode { - VIS_MODE_BASIC, - VIS_MODE_MOVE, - VIS_MODE_OPERATOR, - VIS_MODE_OPERATOR_OPTION, VIS_MODE_NORMAL, - VIS_MODE_TEXTOBJ, + VIS_MODE_OPERATOR_PENDING, VIS_MODE_VISUAL, VIS_MODE_VISUAL_LINE, - VIS_MODE_READLINE, VIS_MODE_PROMPT, VIS_MODE_INSERT, VIS_MODE_REPLACE, @@ -138,12 +133,9 @@ enum VisMode { void vis_mode_switch(Vis*, enum VisMode); /* in the specified mode: map a given key to a binding (binding->key is ignored), * fails if key is already mapped */ -bool vis_mode_map(Vis*, enum VisMode, const char *key, KeyBinding*); +bool vis_mode_map(Vis*, enum VisMode, const char *key, const KeyBinding*); /* in the specified mode: unmap a given key, fails if the key is not currently mapped */ bool vis_mode_unmap(Vis*, enum VisMode, const char *key); -/* map a NULL-terminated array of key bindings, return value indicates whether *all* - * bindings were succesfully performed */ -bool vis_mode_bindings(Vis*, enum VisMode, KeyBinding **bindings); /* get the current mode's status line indicator */ const char *vis_mode_status(Vis*); /* associates the special pseudo key <keyaction->name> with the given key action. |
