From e9f28e98dd09a444fe5ce8a149745e08f9d4228e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Tue, 22 Nov 2016 14:43:48 +0100 Subject: vis: add `:set escdelay nn` option Make the delay used to distinguish between an key and other terminal escape sequences such as for the Meta key run time configurable. The value is given in miliseconds and defaults to 50ms. Notice that terminal multiplexers like dvtm or tmux might also induce some delay which has to be configured independently. --- sam.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sam.c') diff --git a/sam.c b/sam.c index 1f2e061..93c41c2 100644 --- a/sam.c +++ b/sam.c @@ -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 from terminal escape sequences", + }, [OPTION_AUTOINDENT] = { { "autoindent", "ai" }, OPTION_TYPE_BOOL, OPTION_FLAG_NONE, -- cgit v1.2.3