[gnome-builder] vim: underscore motion (_) in c,d,v modes
- From: Sébastien Lafargue <slafargue src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] vim: underscore motion (_) in c,d,v modes
- Date: Mon, 16 Nov 2015 20:06:40 +0000 (UTC)
commit eefb2cbecbff1a40f5499ef9828a5b14a0b8259e
Author: Sebastien Lafargue <slafargue gnome org>
Date: Mon Nov 16 21:04:01 2015 +0100
vim: underscore motion (_) in c,d,v modes
data/keybindings/vim.css | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
---
diff --git a/data/keybindings/vim.css b/data/keybindings/vim.css
index a8de896..a5675b9 100644
--- a/data/keybindings/vim.css
+++ b/data/keybindings/vim.css
@@ -647,6 +647,18 @@
"copy-clipboard" ()
"delete-selection" ()
"end-macro" () };
+
+ /* this is a count - 1 motion, we handle this specific case in C code */
+ bind "underscore" { "begin-macro" ()
+ "movement" (first-char, 0, 1, 0)
+ "movement" (next-line, 1, 0, 1)
+ "movement" (last-char, 1, 0, 0)
+ "copy-clipboard" ()
+ "delete-selection" ()
+ "reindent" ()
+ "clear-count" ()
+ "set-mode" ("vim-insert", permanent) };
+
bind "dollar" { "begin-macro" ()
"set-mode" ("vim-insert", permanent)
"movement" (line-end, 1, 1, 0)
@@ -1144,6 +1156,16 @@
"movement" (first-nonspace-char, 0, 1, 0)
"clear-count" () };
+ /* this is a count - 1 motion, we handle this specific case in C code */
+ bind "underscore" { "begin-macro" ()
+ "movement" (first-char, 0, 1, 0)
+ "movement" (next-line, 1, 0, 0)
+ "movement" (next-line, 1, 0, 1)
+ "copy-clipboard" ()
+ "delete-selection" ()
+ "movement" (first-nonspace-char, 0, 1, 0)
+ "clear-count" () };
+
bind "b" { "begin-macro" ()
"movement" (previous-word-end, 1, 0, 1)
"copy-clipboard" ()
@@ -1919,6 +1941,12 @@
"movement" (next-line, 1, 0, 1)
"movement" (first-nonspace-char, 1, 1, 0)
"clear-count" () };
+
+ /* this is a count - 1 motion, we handle this specific case in C code */
+ bind "underscore" { "begin-macro" ()
+ "movement" (next-line, 1, 0, 1)
+ "movement" (first-nonspace-char, 1, 1, 0)
+ "clear-count" () };
}
@binding-set builder-vim-source-view-visual-i
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]