[gnome-builder] vim: fix indentation for o, O inside of comments



commit 99d9f324948ff8ac2c2e9458b3da7d3b03aba9df
Author: Christian Hergert <chergert redhat com>
Date:   Wed Jun 20 17:25:19 2018 -0700

    vim: fix indentation for o, O inside of comments
    
    This can be pretty annoying when inside a gtk-doc comment. We were
    indenting correctly, but failed to drop the cursor at the right spot. This
    ensures the insertion cursor always ends up at the end of the line, like in
    Vim.

 src/libide/keybindings/vim.css | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/libide/keybindings/vim.css b/src/libide/keybindings/vim.css
index 23663bcc0..685c9d107 100644
--- a/src/libide/keybindings/vim.css
+++ b/src/libide/keybindings/vim.css
@@ -205,7 +205,8 @@
              "set-mode" ("vim-insert", permanent)
              "movement" (line-end, 0, 1, 0)
              "insert-at-cursor" ("\n")
-             "reindent" () };
+             "reindent" ()
+             "movement" (last-char, 0, 0, 0) };
 
   /* insert line before current */
   bind "<shift>o" { "begin-macro" ()
@@ -213,7 +214,8 @@
                     "movement" (first-char, 0, 0, 0)
                     "insert-at-cursor" ("\n")
                     "move-cursor" (display-lines, -1, 0)
-                    "reindent" () };
+                    "reindent" ()
+                    "movement" (last-char, 0, 0, 0) };
 
   bind "minus" { "movement" (previous-line, 0, 1, 1)
                  "movement" (first-nonspace-char, 0, 1, 0)


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