From bd1d849b2033b04a372542c59d458d4f8279c937 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Thu, 14 Apr 2016 21:36:19 +0200 Subject: vis: allow mapping of One should generally use in mappings: :map! normal h except for insert/replace mode where a literal space has to be used: :map! insert " " foo --- vis-cmds.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'vis-cmds.c') diff --git a/vis-cmds.c b/vis-cmds.c index 0ef6139..e58d20a 100644 --- a/vis-cmds.c +++ b/vis-cmds.c @@ -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] == ' ' ? "" : 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); } -- cgit v1.2.3