vis

a vi-like editor based on Plan 9's structural regular expressions

git clone https://9o.is/git/vis.git

commit a50654ec9c34a34f1854f566eb06a8ed208519c1
parent 609c4a5dc2716257b5aac4b82193cde866618d36
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Mon, 15 Feb 2016 13:39:44 +0100

vis: add <C-c> as an alias for <Escape> in normal mode

Based on a patch by Erlend Fagerheim.

Diffstat:
Mconfig.def.h | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/config.def.h b/config.def.h @@ -162,6 +162,7 @@ static const KeyBinding bindings_operator_options[] = { static const KeyBinding bindings_normal[] = { { "<Escape>", ACTION(CURSORS_REMOVE_ALL) }, + { "<C-c>", ALIAS("<Escape>") }, { "<Delete>", ALIAS("x") }, { "<C-k>", ACTION(CURSORS_NEW_LINE_ABOVE) }, { "<C-j>", ACTION(CURSORS_NEW_LINE_BELOW) }, @@ -277,7 +278,7 @@ static const KeyBinding bindings_readline[] = { { "<C-h>", ALIAS("<Backspace>") }, { "<Delete>", ACTION(DELETE_CHAR_NEXT) }, { "<Escape>", ACTION(MODE_NORMAL) }, - { "<C-c>", ALIAS("<Enter>") }, + { "<C-c>", ALIAS("<Escape>") }, { "<C-d>", ACTION(DELETE_CHAR_NEXT) }, { "<C-w>", ACTION(DELETE_WORD_PREV) }, { "<C-u>", ACTION(DELETE_LINE_BEGIN) }, @@ -287,7 +288,6 @@ static const KeyBinding bindings_readline[] = { static const KeyBinding bindings_insert[] = { { "<Escape>", ACTION(MODE_NORMAL) }, - { "<C-c>", ALIAS("<Escape>") }, { "<C-i>", ALIAS("<Tab>") }, { "<Enter>", ACTION(INSERT_NEWLINE) }, { "<C-j>", ALIAS("<Enter>") },