[gnome-builder] libide: implement [{ [( [) and [} vim movements



commit 0cdfa97e0b5ecd92eac28c8ac812b79126d748a1
Author: Christian Hergert <christian hergert me>
Date:   Sat Mar 7 15:42:29 2015 -0800

    libide: implement [{ [( [) and [} vim movements

 data/keybindings/vim.css |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/data/keybindings/vim.css b/data/keybindings/vim.css
index 397f1a7..1dda8c3 100644
--- a/data/keybindings/vim.css
+++ b/data/keybindings/vim.css
@@ -201,6 +201,9 @@
                    "clear-count" () };
   bind "z" { "set-mode" ("vim-normal-z", transient) };
 
+  /* submode for bracket */
+  bind "bracketleft" { "set-mode" ("vim-normal-bracket", transient) };
+
   /* move by paragraph */
   bind "braceleft" { "movement" (paragraph-start, 0, 0, 1)
                      "clear-count" () };
@@ -335,6 +338,15 @@
   bind "<ctrl>v" { "set-mode" ("vim-visual-block", permanent) };
 }
 
+ binding-set builder-vim-source-view-normal-bracket
+{
+  bind "braceleft" { "movement" (previous-unmatched-brace, 0, 1, 1) };
+  bind "braceright" { "movement" (next-unmatched-brace, 0, 1, 1) };
+
+  bind "parenleft" { "movement" (previous-unmatched-paren, 0, 1, 1) };
+  bind "parenright" { "movement" (next-unmatched-paren, 0, 1, 1) };
+}
+
 @binding-set builder-vim-source-view-normal-c
 {
   bind "i" { "set-mode" ("vim-normal-c-i", transient) };
@@ -800,6 +812,15 @@ IdeSourceViewMode.vim-normal-with-count {
                     builder-vim-source-view-normal;
 }
 
+IdeSourceViewMode.vim-normal-bracket {
+  -IdeSourceViewMode-suppress-unbound: true;
+  -IdeSourceViewMode-coalesce-undo: true;
+  -IdeSourceViewMode-block-cursor: true;
+
+  gtk-key-bindings: builder-vim-source-view,
+                    builder-vim-source-view-normal-bracket;
+}
+
 IdeSourceViewMode.vim-normal-c {
   -IdeSourceViewMode-suppress-unbound: true;
   -IdeSourceViewMode-coalesce-undo: true;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]