Replicate Vim backspace and CTRL-C behaviour (#129)
This commit is contained in:
parent
9ead6f6427
commit
40d69470fb
|
@ -154,10 +154,13 @@ function keymap.on_key_pressed(k)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
elseif mode == 'insert' then
|
elseif mode == 'insert' then
|
||||||
if stroke == 'escape' then
|
if stroke == 'escape' or stroke == 'ctrl+c' then
|
||||||
core.set_editing_mode(core.active_view, 'command')
|
core.set_editing_mode(core.active_view, 'command')
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
if stroke == 'backspace' then
|
||||||
|
command.perform('doc:backspace')
|
||||||
|
end
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
local commands = keymap.map[stroke]
|
local commands = keymap.map[stroke]
|
||||||
|
|
Loading…
Reference in New Issue