From 40d69470fb9985f5d26dcc13c1bc17439267acf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20=C5=A0tojs?= <73613708+netrobert@users.noreply.github.com> Date: Thu, 25 Mar 2021 08:55:48 +0100 Subject: [PATCH] Replicate Vim backspace and CTRL-C behaviour (#129) --- data/core/keymap.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/data/core/keymap.lua b/data/core/keymap.lua index 2cc80366..8248151b 100644 --- a/data/core/keymap.lua +++ b/data/core/keymap.lua @@ -154,10 +154,13 @@ function keymap.on_key_pressed(k) return true end elseif mode == 'insert' then - if stroke == 'escape' then + if stroke == 'escape' or stroke == 'ctrl+c' then core.set_editing_mode(core.active_view, 'command') return true end + if stroke == 'backspace' then + command.perform('doc:backspace') + end return false end local commands = keymap.map[stroke]