[gnome-builder/wip/vim] vim: make ctrl+[ a synonym for Esc.
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/vim] vim: make ctrl+[ a synonym for Esc.
- Date: Wed, 1 Oct 2014 23:30:58 +0000 (UTC)
commit 4ca2b418eed40d2853a5770fc1995c8a23495672
Author: Christian Hergert <christian hergert me>
Date: Wed Oct 1 16:30:50 2014 -0700
vim: make ctrl+[ a synonym for Esc.
src/editor/gb-editor-vim.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/editor/gb-editor-vim.c b/src/editor/gb-editor-vim.c
index 1c42ca8..35577d8 100644
--- a/src/editor/gb-editor-vim.c
+++ b/src/editor/gb-editor-vim.c
@@ -1408,6 +1408,10 @@ gb_editor_vim_handle_normal (GbEditorVim *vim,
switch (event->keyval)
{
+ case GDK_KEY_bracketleft:
+ if ((event->state & GDK_CONTROL_MASK) == 0)
+ break;
+ /* Fall through */
case GDK_KEY_Escape:
/*
* Escape any selections we currently have.
@@ -1717,6 +1721,10 @@ gb_editor_vim_handle_insert (GbEditorVim *vim,
{
switch (event->keyval)
{
+ case GDK_KEY_bracketleft:
+ if ((event->state & GDK_CONTROL_MASK) == 0)
+ break;
+ /* Fall through */
case GDK_KEY_Escape:
/*
* First move back onto the last character we entered, and then
@@ -1756,6 +1764,10 @@ gb_editor_vim_handle_command (GbEditorVim *vim,
switch (event->keyval)
{
+ case GDK_KEY_bracketleft:
+ if ((event->state & GDK_CONTROL_MASK) == 0)
+ break;
+ /* Fall through */
case GDK_KEY_Escape:
/*
* Escape back into NORMAL mode.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]