[gnome-builder/wip/libide] libide: improve dip and cip vim movements



commit 42458af87160c5615e26f6f0174af07a5edc3b18
Author: Christian Hergert <christian hergert me>
Date:   Fri Mar 6 13:21:31 2015 -0800

    libide: improve dip and cip vim movements

 data/keybindings/vim.css |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/data/keybindings/vim.css b/data/keybindings/vim.css
index 9945ba8..5966bcd 100644
--- a/data/keybindings/vim.css
+++ b/data/keybindings/vim.css
@@ -275,6 +275,7 @@
              "swap-selection-bounds" ()
              "movement" (paragraph-end, 1, 1, 1)
              "copy-clipboard" ()
+             "selection-theatric" (shrink)
              "delete-selection" ()
              "set-mode" ("vim-insert", permanent) };
 }
@@ -317,6 +318,7 @@
                  "copy-selection" ()
                  "delete-selection" () };
 
+  bind "i" { "set-mode" ("vim-normal-d-i", transient) };
   bind "g" { "set-mode" ("vim-normal-d-g", transient) };
 
   bind "d" { "movement" (first-char, 0, 0, 0)
@@ -468,6 +470,18 @@
              "delete-selection" () };
 }
 
+ binding-set builder-vim-source-view-normal-d-i
+{
+  bind "p" { "movement" (paragraph-start, 1, 1, 1)
+             "movement" (first-char, 1, 1, 0)
+             "swap-selection-bounds" ()
+             "movement" (paragraph-end, 1, 1, 1)
+             "movement" (last-char, 1, 1, 0)
+             "copy-clipboard" ()
+             "selection-theatric" (shrink)
+             "delete-selection" () };
+}
+
 @binding-set builder-vim-source-view-visual-g
 {
   bind "e" { "movement" (previous-word-end, 1, 1, 0)
@@ -680,6 +694,11 @@ IdeSourceViewMode.vim-normal-d-g {
                     builder-vim-source-view-normal-d-g;
 }
 
+IdeSourceViewMode.vim-normal-d-i {
+  gtk-key-bindings: builder-vim-source-view,
+                    builder-vim-source-view-normal-d-i;
+}
+
 IdeSourceViewMode.vim-normal-g {
   gtk-key-bindings: builder-vim-source-view,
                     builder-vim-source-view-normal-g;


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