1
@import url("resource:///org/gnome/builder/keybindings/shared.css");
3
@binding-set builder-emacs-text-entry
5
bind "<ctrl>b" { "move-cursor" (logical-positions, -1, 0) };
6
bind "<shift><ctrl>b" { "move-cursor" (logical-positions, -1, 1) };
7
bind "<ctrl>f" { "move-cursor" (logical-positions, 1, 0) };
8
bind "<shift><ctrl>f" { "move-cursor" (logical-positions, 1, 1) };
10
bind "<alt>b" { "move-cursor" (words, -1, 0) };
11
bind "<shift><alt>b" { "move-cursor" (words, -1, 1) };
12
bind "<alt>f" { "move-cursor" (words, 1, 0) };
13
bind "<shift><alt>f" { "move-cursor" (words, 1, 1) };
15
bind "<ctrl>a" { "move-cursor" (paragraph-ends, -1, 0) };
16
bind "<shift><ctrl>a" { "move-cursor" (paragraph-ends, -1, 1) };
17
bind "<ctrl>e" { "move-cursor" (paragraph-ends, 1, 0) };
18
bind "<shift><ctrl>e" { "move-cursor" (paragraph-ends, 1, 1) };
20
bind "<ctrl>w" { "cut-clipboard" () };
21
bind "<alt>w" { "copy-clipboard" () };
22
bind "<ctrl>y" { "paste-clipboard" () };
24
bind "<ctrl>d" { "delete-from-cursor" (chars, 1) };
25
bind "<alt>d" { "delete-from-cursor" (word-ends, 1) };
26
bind "<ctrl>k" { "delete-from-cursor" (paragraph-ends, 1) };
27
bind "<alt>backslash" { "delete-from-cursor" (whitespace, 1) };
29
bind "<alt>space" { "delete-from-cursor" (whitespace, 1)
30
"insert-at-cursor" (" ") };
31
bind "<alt>KP_Space" { "delete-from-cursor" (whitespace, 1)
32
"insert-at-cursor" (" ") };
36
* Bindings for GtkTextView
38
@binding-set builder-emacs-text-view
40
bind "<ctrl>p" { "move-cursor" (display-lines, -1, 0) };
41
bind "<shift><ctrl>p" { "move-cursor" (display-lines, -1, 1) };
42
bind "<ctrl>n" { "move-cursor" (display-lines, 1, 0) };
43
bind "<shift><ctrl>n" { "move-cursor" (display-lines, 1, 1) };
45
bind "<ctrl>space" { "set-anchor" () };
46
bind "<ctrl>KP_Space" { "set-anchor" () };
49
@binding-set builder-emacs-source-view
51
bind "<ctrl>x" { "set-mode" ("emacs-x", transient) };
52
bind "<ctrl>underscore" { "undo" () };
53
bind "<alt>x" { "action" ("workbench", "show-command-bar", "") };
54
bind "<ctrl>s" { "action" ("editor-frame", "find", "") };
55
bind "<ctrl>period" { "action" ("workbench", "global-search", "") };
56
bind "<alt>period" { "goto-definition" () };
57
bind "<ctrl>comma" { "action" ("app", "preferences", "") };
58
bind "<alt>n" { "move-error" (down) };
59
bind "<alt>p" { "move-error" (up) };
60
bind "<ctrl>j" { "action" ("view-grid", "focus-neighbor", "3") };
61
bind "<shift><ctrl>j" { "action" ("view-stack", "split-down", "") };
62
bind "F2" { "clear-selection" ()
63
"movement" (previous-word-end, 0, 1, 1)
64
"movement" (next-word-start, 0, 1, 0)
65
"movement" (next-word-end, 1, 0, 1)
66
"request-documentation" ()
68
"clear-selection" () };
70
/* swap between header/source */
71
bind "<alt>o" { "action" ("view", "find-other-file", "") };
74
bind "<ctrl><alt>Page_Up" { "action" ("view-stack", "previous-view", "") };
75
bind "<ctrl><alt>KP_Page_Up" { "action" ("view-stack", "previous-view", "") };
76
bind "<ctrl><alt>Page_Down" { "action" ("view-stack", "next-view", "") };
77
bind "<ctrl><alt>KP_Page_Down" { "action" ("view-stack", "next-view", "") };
79
bind "<alt>0" { "append-to-count" (0) };
80
bind "<alt>1" { "append-to-count" (1) };
81
bind "<alt>2" { "append-to-count" (2) };
82
bind "<alt>3" { "append-to-count" (3) };
83
bind "<alt>4" { "append-to-count" (4) };
84
bind "<alt>5" { "append-to-count" (5) };
85
bind "<alt>6" { "append-to-count" (6) };
86
bind "<alt>7" { "append-to-count" (7) };
87
bind "<alt>8" { "append-to-count" (8) };
88
bind "<alt>9" { "append-to-count" (9) };
90
bind "F6" { "action" ("view", "preview", "") };
91
bind "F9" { "action" ("workspace", "toggle-sidebar", "") };
94
@binding-set builder-emacs-source-view-x
96
bind "<ctrl>c" { "action" ("app", "quit", "") };
97
bind "0" { "action" ("view", "close", "") };
98
bind "k" { "action" ("view", "close", "") };
99
bind "<ctrl>f" { "action" ("workbench", "open", "") };
100
bind "<ctrl>s" { "action" ("view", "save", "") };
101
bind "s" { "action" ("workbench", "save-all", "") };
102
bind "b" { "action" ("workbench", "new-document", "") };
103
bind "<ctrl>b" { "action" ("view-stack", "show-list", "") };
104
bind "<ctrl>w" { "action" ("view", "save-as", "") };
105
bind "u" { "redo" () };
106
bind "2" { "action" ("editor-view", "toggle-split", "") };
107
bind "3" { "action" ("stack", "split-document-right", "") };
108
bind "o" { "action" ("stack", "focus-right", "") };
109
bind "grave" { "move-error" (down) };
110
bind "h" { "select-all" (1) };
114
* Bindings for GtkTreeView
116
@binding-set builder-emacs-tree-view
118
bind "<ctrl>s" { "start-interactive-search" () };
119
bind "<ctrl>f" { "move-cursor" (logical-positions, 1) };
120
bind "<ctrl>b" { "move-cursor" (logical-positions, -1) };
123
@binding-set builder-emacs-list-box
125
bind "<ctrl>f" { "move-cursor" (display-lines, 1) };
126
bind "<ctrl>b" { "move-cursor" (display-lines, -1) };
130
gtk-key-bindings: builder-emacs-text-entry;
134
gtk-key-bindings: builder-emacs-text-entry, builder-emacs-text-view;
138
IdeSourceViewMode.default
140
-IdeSourceViewMode-repeat-insert-with-count: true;
142
gtk-key-bindings: builder-emacs-text-entry, builder-emacs-source-view, builder-emacs-text-view;
145
IdeSourceViewMode.emacs-x {
146
-IdeSourceViewMode-display-name: "C-x";
148
gtk-key-bindings: builder-emacs-source-view-x;
152
gtk-key-bindings: builder-emacs-tree-view;
156
gtk-key-bindings: builder-emacs-list-box;
160
gtk-key-bindings: builder-emacs-tree-view,
161
builder-gb-project-tree;