[gnome-builder] vim: implement == to reindent the current line



commit 407ff98c70b4a78afd779592c94f35bfc2e2441e
Author: Christian Hergert <chergert redhat com>
Date:   Sat Oct 10 17:28:31 2015 -0400

    vim: implement == to reindent the current line

 data/keybindings/vim.css |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/data/keybindings/vim.css b/data/keybindings/vim.css
index c63e863..da32fb3 100644
--- a/data/keybindings/vim.css
+++ b/data/keybindings/vim.css
@@ -490,6 +490,14 @@
 
   /* window controls */
   bind "<ctrl>w" { "set-mode" ("vim-normal-ctrl-w", transient) };
+
+  /* reindent */
+  bind "equal" { "set-mode" ("vim-normal-equal", transient) };
+}
+
+ binding-set builder-vim-source-view-normal-equal
+{
+  bind "equal" { "reindent" () };
 }
 
 @binding-set builder-vim-source-view-normal-bracket
@@ -1407,6 +1415,14 @@ IdeSourceViewMode.vim-normal-bracket {
                     builder-vim-source-view-normal-bracket;
 }
 
+IdeSourceViewMode.vim-normal-equal {
+  -IdeSourceViewMode-suppress-unbound: true;
+  -IdeSourceViewMode-block-cursor: true;
+
+  gtk-key-bindings: builder-vim-source-view,
+                    builder-vim-source-view-normal-equal;
+}
+
 IdeSourceViewMode.vim-normal-c {
   -IdeSourceViewMode-suppress-unbound: true;
   -IdeSourceViewMode-block-cursor: true;


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