[gnome-builder] vim: fix d with up and down motion



commit 2313ffc94f8f4d2b94464c611f66445121ce0636
Author: Sebastien Lafargue <slafargue gnome org>
Date:   Wed Nov 11 00:56:12 2015 +0100

    vim: fix d with up and down motion
    
    fix 'd up' params so that it work like 'dk' and
    the cursor end up on the first non-space char

 data/keybindings/vim.css |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/data/keybindings/vim.css b/data/keybindings/vim.css
index e66c378..62d779e 100644
--- a/data/keybindings/vim.css
+++ b/data/keybindings/vim.css
@@ -946,10 +946,11 @@
 
   bind "Up"    { "begin-macro" ()
                  "movement" (line-end, 0, 0, 0)
-                 "movement" (previous-line, 1, 1, 0)
-                 "movement" (previous-line, 1, 1, 1)
+                 "movement" (previous-line, 1, 0, 0)
+                 "movement" (previous-line, 1, 0, 1)
                  "copy-clipboard" ()
                  "delete-selection" ()
+                 "movement" (first-nonspace-char, 0, 1, 0)
                  "end-macro" () };
   bind "k"     { "begin-macro" ()
                  "movement" (line-end, 0, 0, 0)
@@ -957,6 +958,7 @@
                  "movement" (previous-line, 1, 0, 1)
                  "copy-clipboard" ()
                  "delete-selection" ()
+                 "movement" (first-nonspace-char, 0, 1, 0)
                  "end-macro" () };
 
   bind "Down"  { "begin-macro" ()
@@ -965,6 +967,7 @@
                  "movement" (next-line, 1, 0, 1)
                  "copy-clipboard" ()
                  "delete-selection" ()
+                 "movement" (first-nonspace-char, 0, 1, 0)
                  "end-macro" () };
   bind "j"     { "begin-macro" ()
                  "movement" (first-char, 0, 1, 0)
@@ -972,6 +975,7 @@
                  "movement" (next-line, 1, 0, 1)
                  "copy-clipboard" ()
                  "delete-selection" ()
+                 "movement" (first-nonspace-char, 0, 1, 0)
                  "end-macro" () };
 
   bind "i" { "set-mode" ("vim-normal-d-i", transient) };


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