~ubuntu-branches/debian/stretch/gnome-builder/stretch

« back to all changes in this revision

Viewing changes to data/keybindings/emacs.css

  • Committer: Package Import Robot
  • Author(s): Andreas Henriksson
  • Date: 2015-10-11 12:38:45 UTC
  • Revision ID: package-import@ubuntu.com-20151011123845-a0hvkz01se0p1p5a
Tags: upstream-3.16.3
ImportĀ upstreamĀ versionĀ 3.16.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
@import url("resource:///org/gnome/builder/keybindings/shared.css");
 
2
 
 
3
@binding-set builder-emacs-text-entry
 
4
{
 
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) };
 
9
 
 
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) };
 
14
 
 
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) };
 
19
 
 
20
  bind "<ctrl>w" { "cut-clipboard" () };
 
21
  bind "<alt>w" { "copy-clipboard" () };
 
22
  bind "<ctrl>y" { "paste-clipboard" () };
 
23
 
 
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) };
 
28
 
 
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" (" ")  };
 
33
}
 
34
 
 
35
/*
 
36
 * Bindings for GtkTextView
 
37
 */
 
38
@binding-set builder-emacs-text-view
 
39
{
 
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) };
 
44
 
 
45
  bind "<ctrl>space" { "set-anchor" () };
 
46
  bind "<ctrl>KP_Space" { "set-anchor" () };
 
47
}
 
48
 
 
49
@binding-set builder-emacs-source-view
 
50
{
 
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" ()
 
67
              "clear-count" ()
 
68
              "clear-selection" () };
 
69
 
 
70
  /* swap between header/source */
 
71
  bind "<alt>o" { "action" ("view", "find-other-file", "") };
 
72
 
 
73
  /* cycle "tabs" */
 
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", "") };
 
78
 
 
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) };
 
89
 
 
90
  bind "F6" { "action" ("view", "preview", "") };
 
91
  bind "F9" { "action" ("workspace", "toggle-sidebar", "") };
 
92
}
 
93
 
 
94
@binding-set builder-emacs-source-view-x
 
95
{
 
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) };
 
111
}
 
112
 
 
113
/*
 
114
 * Bindings for GtkTreeView
 
115
 */
 
116
@binding-set builder-emacs-tree-view
 
117
{
 
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) };
 
121
}
 
122
 
 
123
@binding-set builder-emacs-list-box
 
124
{
 
125
  bind "<ctrl>f" { "move-cursor" (display-lines, 1) };
 
126
  bind "<ctrl>b" { "move-cursor" (display-lines, -1) };
 
127
}
 
128
 
 
129
GtkEntry {
 
130
  gtk-key-bindings: builder-emacs-text-entry;
 
131
}
 
132
 
 
133
GtkTextView {
 
134
  gtk-key-bindings: builder-emacs-text-entry, builder-emacs-text-view;
 
135
}
 
136
 
 
137
GtkSourceView,
 
138
IdeSourceViewMode.default
 
139
{
 
140
  -IdeSourceViewMode-repeat-insert-with-count: true;
 
141
 
 
142
  gtk-key-bindings: builder-emacs-text-entry, builder-emacs-source-view, builder-emacs-text-view;
 
143
}
 
144
 
 
145
IdeSourceViewMode.emacs-x {
 
146
  -IdeSourceViewMode-display-name: "C-x";
 
147
 
 
148
  gtk-key-bindings: builder-emacs-source-view-x;
 
149
}
 
150
 
 
151
GtkTreeView {
 
152
  gtk-key-bindings: builder-emacs-tree-view;
 
153
}
 
154
 
 
155
GtkListBox {
 
156
  gtk-key-bindings: builder-emacs-list-box;
 
157
}
 
158
 
 
159
GbProjectTree {
 
160
  gtk-key-bindings: builder-emacs-tree-view,
 
161
                    builder-gb-project-tree;
 
162
}