diff options
| -rw-r--r-- | README.md | 5 | ||||
| -rw-r--r-- | sam.c | 6 | ||||
| -rw-r--r-- | vis-cmds.c | 6 |
3 files changed, 17 insertions, 0 deletions
@@ -412,6 +412,11 @@ Operators can be forced to work line wise by specifying `V`. set shell to use for external commands (e.g. <, >, |) + escdelay number default 50 (50ms) + + miliseconds to wait to distinguish between an <Escape> key and other + terminal escape sequences + tabwidth [1-8] default 8 set display width of a tab and number of spaces to use if @@ -281,6 +281,7 @@ typedef struct { enum { OPTION_SHELL, + OPTION_ESCDELAY, OPTION_AUTOINDENT, OPTION_EXPANDTAB, OPTION_TABWIDTH, @@ -302,6 +303,11 @@ static const OptionDef options[] = { OPTION_TYPE_STRING, OPTION_FLAG_NONE, "Shell to use for external commands (default: $SHELL, /etc/passwd, /bin/sh)", }, + [OPTION_ESCDELAY] = { + { "escdelay" }, + OPTION_TYPE_NUMBER, OPTION_FLAG_NONE, + "Miliseconds to wait to distinguish <Escape> from terminal escape sequences", + }, [OPTION_AUTOINDENT] = { { "autoindent", "ai" }, OPTION_TYPE_BOOL, OPTION_FLAG_NONE, @@ -140,6 +140,12 @@ static bool cmd_set(Vis *vis, Win *win, Command *cmd, const char *argv[], Cursor vis->shell = shell; break; } + case OPTION_ESCDELAY: + { + TermKey *termkey = vis->ui->termkey_get(vis->ui); + termkey_set_waittime(termkey, arg.i); + break; + } case OPTION_EXPANDTAB: vis->expandtab = arg.b; break; |
