[gnome-builder] libide: more wip on vim mode via css
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] libide: more wip on vim mode via css
- Date: Mon, 23 Mar 2015 23:52:56 +0000 (UTC)
commit 6f1ea8018fbddc8dc22636ba7dd1e623151d49c7
Author: Christian Hergert <christian hergert me>
Date: Tue Mar 3 23:54:35 2015 -0800
libide: more wip on vim mode via css
data/keybindings/vim.css | 54 +++++++++++++++++++++++++--------------------
1 files changed, 30 insertions(+), 24 deletions(-)
---
diff --git a/data/keybindings/vim.css b/data/keybindings/vim.css
index 3f31179..d79717d 100644
--- a/data/keybindings/vim.css
+++ b/data/keybindings/vim.css
@@ -17,8 +17,8 @@
"movement" (next-char, 0) };
/* insert at first non-whitespace character */
- bind "I" { "set-mode" ("vim-insert", permanent)
- "movement" (first-nonspace-char, 0) };
+ bind "<shift>i" { "set-mode" ("vim-insert", permanent)
+ "movement" (first-nonspace-char, 0) };
/* insert line after current, insert mode */
bind "o" { "set-mode" ("vim-insert", permanent)
@@ -26,10 +26,10 @@
"insert-at-cursor" ("\n") };
/* insert line before current */
- bind "O" { "set-mode" ("vim-insert", permanent)
- "movement" (first-char, 0)
- "insert-at-cursor" ("\n")
- "move-cursor" (display-lines, -1, 0) };
+ bind "<shift>o" { "set-mode" ("vim-insert", permanent)
+ "movement" (first-char, 0)
+ "insert-at-cursor" ("\n")
+ "move-cursor" (display-lines, -1, 0) };
/* swallow the current character and go to insert */
bind "s" { "set-mode" ("vim-insert", permanent)
@@ -48,7 +48,7 @@
bind "w" { "movement" (next-word-start, 0) };
/* move to special sub-mode 'g' */
- bind "g" { "set-mode" ("vim-normal-g", modal) };
+ bind "g" { "set-mode" ("vim-normal-g", permanent) };
/* move by word ends */
bind "e" { "movement" (next-word-end, 0) };
@@ -70,21 +70,21 @@
bind "parenright" { "movement" (next-sentance, 0) };
/* move to line offset of zero, and first non-whitespace char, end of line */
- bind "0" { "movement" (first-char) };
- bind "caret" { "movement" (first-nonspace-char) };
- bind "dollar" { "movement" (last-char) };
- bind "bar" { "movement" (nth-char) };
+ bind "0" { "movement" (first-char, 0) };
+ bind "<shift>asciicircum" { "movement" (first-nonspace-char, 0) };
+ bind "dollar" { "movement" (last-char, 0) };
+ bind "bar" { "movement" (nth-char, 0) };
/* jump to match of brace/bracket/comment/etc */
bind "percent" { "movement" (match-special, 0) };
/* move based on visible screen area */
- bind "H" { "movement" (screen-top, 0) };
- bind "M" { "movement" (screen-middle, 0) };
- bind "L" { "movement" (screen-bottom, 0) };
+ bind "<shift>h" { "movement" (screen-top, 0) };
+ bind "<shift>m" { "movement" (screen-middle, 0) };
+ bind "<shift>l" { "movement" (screen-bottom, 0) };
/* move to nth line, defaults to last */
- bind "G" { "movement" (nth-line, 0) };
+ bind "<shift>g" { "movement" (nth-line, 0) };
/* Undo & Redo */
bind "u" { "undo" () };
@@ -94,22 +94,22 @@
bind "x" { "movement" (next-char, 1)
"copy" ()
"delete-from-cursor" (chars, 1) };
- bind "X" { "movement" (previous-char, 1)
- "copy" ()
- "delete-from-cursor" (chars, 1) };
+ bind "<shift>x" { "movement" (previous-char, 1)
+ "copy" ()
+ "delete-from-cursor" (chars, 1) };
/* copy */
bind "y" { "set-mode" ("vim-normal-y") };
- bind "Y" { "save-cursor" ()
- "set-mode" ("vim-visual-line")
- "copy" ()
- "set-mode" ("vim-normal")
- "restore-cursor" () };
+ bind "<shift>y" { "save-cursor" ()
+ "set-mode" ("vim-visual-line")
+ "copy" ()
+ "set-mode" ("vim-normal")
+ "restore-cursor" () };
/* visual mode transition */
bind "v" { "movement" (next-char, 1)
"set-mode" ("vim-visual") };
- bind "V" { "set-mode" ("vim-visual-line") };
+ bind "<shift>v" { "set-mode" ("vim-visual-line") };
bind "<ctrl>v" { "set-mode" ("vim-visual-block") };
}
@@ -119,6 +119,8 @@
@binding-set builder-vim-source-view-normal-g
{
+ bind "m" { "movement" (middle-char, 0)
+ "set-mode" ("vim-normal", permanent) };
}
@binding-set builder-vim-source-view-normal-number
@@ -149,6 +151,10 @@ IdeSourceViewMode.vim-normal {
gtk-key-bindings: builder-vim-source-view, builder-vim-source-view-normal;
}
+IdeSourceViewMode.vim-normal-g {
+ gtk-key-bindings: builder-vim-source-view, builder-vim-source-view-normal-g;
+}
+
IdeSourceViewMode.vim-insert {
gtk-key-bindings: builder-vim-source-view, builder-vim-source-view-insert;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]