[gnome-builder] vim: move cursor back one char when leaving insert mode
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] vim: move cursor back one char when leaving insert mode
- Date: Sun, 19 Apr 2015 20:29:56 +0000 (UTC)
commit 5f486f85509d2f09aa2fd73e5ca02d9834355e90
Author: Christian Hergert <christian hergert me>
Date: Sun Apr 19 13:29:49 2015 -0700
vim: move cursor back one char when leaving insert mode
This makes things feel a lot more like vim, where the cursor actually
moves "backwards" one character when leaving insert mode. It's not really
the case, just an inconsistency between GtkTextView and Vim.
data/keybindings/vim.css | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/data/keybindings/vim.css b/data/keybindings/vim.css
index a2afce9..691ab14 100644
--- a/data/keybindings/vim.css
+++ b/data/keybindings/vim.css
@@ -1020,6 +1020,14 @@
bind "<ctrl>e" { "movement" (screen-up, 0, 0, 1) };
bind "<ctrl>y" { "movement" (screen-down, 0, 0, 1) };
+
+ bind "Escape" { "end-macro" ()
+ "set-overwrite" (0)
+ "clear-count" ()
+ "clear-selection" ()
+ "clear-snippets" ()
+ "movement" (previous-char, 0, 1, 0)
+ "set-mode" ("vim-normal", permanent) };
}
@binding-set builder-vim-source-view-visual-with-count
@@ -1479,8 +1487,8 @@ IdeSourceViewMode.vim-insert {
-IdeSourceViewMode-block-cursor: false;
-IdeSourceViewMode-display-name: "Insert";
- gtk-key-bindings: builder-vim-source-view,
- builder-vim-source-view-insert;
+ gtk-key-bindings: builder-vim-source-view-insert,
+ builder-vim-source-view;
}
IdeSourceViewMode.vim-visual {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]