diff options
| -rw-r--r-- | config.def.h | 3 | ||||
| -rw-r--r-- | vis-cmds.c | 7 | ||||
| -rw-r--r-- | vis.c | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/config.def.h b/config.def.h index 2ca1a82..f01d556 100644 --- a/config.def.h +++ b/config.def.h @@ -51,7 +51,8 @@ static const KeyBinding bindings_motions[] = { { ",", ACTION(TOTILL_REVERSE) }, { "+", ALIAS("j^") }, { "-", ALIAS("k^") }, - { " ", ALIAS("l") }, + { " ", ALIAS("<Space>") }, + { "<Space>", ALIAS("l") }, { "<Backspace>", ALIAS("h") }, { "B", ACTION(CURSOR_LONGWORD_START_PREV) }, { "b", ACTION(CURSOR_WORD_START_PREV) }, @@ -471,16 +471,15 @@ static bool cmd_earlier_later(Vis *vis, Win *win, Command *cmd, const char *argv } static bool print_keylayout(const char *key, void *value, void *data) { - return text_appendf(data, " %-15s\t%s\n", key, (char*)value); + return text_appendf(data, " %-18s\t%s\n", key[0] == ' ' ? "␣" : key, (char*)value); } static bool print_keybinding(const char *key, void *value, void *data) { - Text *txt = data; KeyBinding *binding = value; const char *desc = binding->alias; if (!desc && binding->action) desc = binding->action->help; - return text_appendf(txt, " %-15s\t%s\n", key[0] == ' ' ? "<Space>" : key, desc ? desc : ""); + return text_appendf(data, " %-18s\t%s\n", key[0] == ' ' ? "␣" : key, desc ? desc : ""); } static void print_mode(Mode *mode, Text *txt) { @@ -507,7 +506,7 @@ static bool cmd_help(Vis *vis, Win *win, Command *cmd, const char *argv[], Curso for (int i = 0; i < LENGTH(vis_modes); i++) { Mode *mode = &vis_modes[i]; if (mode->help) - text_appendf(txt, " %-15s\t%s\n", mode->name, mode->help); + text_appendf(txt, " %-18s\t%s\n", mode->name, mode->help); } @@ -361,7 +361,7 @@ Vis *vis_new(Ui *ui, VisEvent *event) { goto err; if (!(vis->search_file = file_new_internal(vis, NULL))) goto err; - if (!(vis->keymap = map_new())) + if (!(vis->keymap = map_new()) || !map_put(vis->keymap, " ", "<Space>")) goto err; vis->mode_prev = vis->mode = &vis_modes[VIS_MODE_NORMAL]; vis->event = event; |
