]> git.lyx.org Git - lyx.git/blob - lib/bind/emacs.bind
Remove profiling.py
[lyx.git] / lib / bind / emacs.bind
1 # -*- text -*-
2
3 # file emacs.bind
4 # This file is part of LyX, the document processor.
5 # Licence details can be found in the file COPYING.
6
7 # author Lars Gullik Bjønnes
8 # author Jean-Marc Lasgouttes
9 # author Angus Leeming
10 # author John Levon
11 # author Allan Rae
12 # author Jürgen Spitzmüller
13 # author Andrew Zabolotny
14
15 # Full author contact details are available in file CREDITS.
16
17 # This is the EMACS flavour bind file, based on the bindings found
18 # in the Emacs editor.
19 #
20 #
21 # DO NOT CHANGE THIS DEFAULT BINDING FILE! It will be replaced
22 # with every new install of LyX and your changes will be lost.
23 # Instead, customize a copy of this file placed in
24 # ~/.lyx/bind/emacs.bind
25 #
26 # Happy tuning!
27
28 Format 5
29
30 \bind "C-~S-at"                 "mark-on"
31 \bind "C-a"                     "line-begin"
32 \bind "C-b"                     "char-backward"
33 #bind "C-c"                     "------" // used as users prefix
34 \bind "C-d"                     "char-delete-forward confirm"
35 \bind "C-e"                     "line-end"
36 \bind "C-f"                     "char-forward"
37 \bind "C-g"                     "cancel"
38
39 # help in emacs
40 \bind "C-h"                    "specialchar-insert hyphenation"
41 \bind "C-M-minus"               "specialchar-insert nobreakdash"
42 \bind "C-i"                    "space-insert hfill"
43 \bind "C-j"                    "paragraph-break"
44 \bind "C-k"                    "line-delete-forward"
45 \bind "C-l"                    "screen-recenter"
46 \bind "C-m"                    "mark-toggle"
47 \bind "C-n"                    "down"
48 \bind "C-o"                    "inset-toggle"
49
50 # facemenu-menu in emacs
51 \bind "M-o"                    "inset-settings"
52 \bind "C-p"                    "up"
53
54 # this is "quoted-insert" a total different meaning from "quote-insert"
55 \bind "C-q"                    "self-insert \""
56 #bind "C-r"                    "------"
57 \bind "C-s"                    "dialog-show findreplace"
58 \bind "C-S-s"                  "dialog-show findreplaceadv"
59 \bind "M-~S-percent"           "dialog-show findreplaceadv"
60
61 \bind "C-t"                    "chars-transpose"
62
63 # universal argument in emacs
64 \bind "C-u"                    "font-underline"
65
66 # better name would be "scroll-up" as in emacs
67 \bind "C-v"                    "screen-down"
68
69 \bind "C-w"                    "cut"
70 #bind "C-x"                    "------"
71 \bind "C-y"                    "paste"
72
73 #should be "lyx-iconify"
74 #bind "C-z"                    "------"
75
76 \bind "C-~S-slash"             "undo"
77 \bind "C-~S-underscore"        "undo"
78
79 \bind "~S-M-quotedbl"           "quote-insert inner"
80 \bind "~S-C-quotedbl"           "quote-insert outer auto plain"
81
82 \bind "C-x a"                  "buffer-auto-save"
83 #\bind "C-x b"                 "buffer-previous"
84 \bind "C-x d"                  "buffer-new"
85 \bind "C-x g"                  "buffer-view ps"
86 \bind "C-x k"                  "buffer-close"
87 \bind "C-x o"                  "tab-group-next"
88 \bind "C-x p"                  "buffer-view dvi"
89 \bind "C-x r"                  "buffer-update dvi"
90 # Should have been "buffer-write-some"
91 # \bind "C-x s"                  "buffer-write"
92 \bind "C-x t"                  "buffer-update dvi"
93 \bind "C-x u"                  "undo"
94 \bind "C-x v h"                "dialog-show vclog"
95 \bind "C-x v v"                "vc-check-in"
96 \bind "C-x v u"                "vc-revert"
97 \bind "C-x v c"                "vc-undo-last"
98 \bind "C-x v i"                "vc-register"
99 \bind "C-x bracketleft"        "screen-up"
100 \bind "C-x bracketright"       "screen-down"
101 \bind "C-x C-a"                "buffer-auto-save"
102 \bind "C-x C-b"                "menu-open view"
103 \bind "C-x C-c"                "lyx-quit"
104 \bind "C-x C-d"                "buffer-new"
105 \bind "C-x C-f"                "file-open"
106 \bind "C-x C-g"                "buffer-view ps"
107 \bind "C-x C-p"                "buffer-view dvi"
108 \bind "C-x C-q"                "buffer-toggle-read-only"
109 #\bind "C-x C-r"                "buffer-update dvi"
110 \bind "C-x C-s"                "buffer-write"
111 \bind "C-x C-t"                "buffer-update dvi"
112 \bind "C-Next"                 "buffer-next"
113 \bind "C-Prior"                "buffer-previous"
114 \bind "S-F7"                   "thesaurus-entry"
115 \bind "S-F8"                   "dialog-show spellchecker"
116 \bind "C-x 0"                  "view-close"
117
118 # Window commands
119 \bind "C-x 5 2"                "window-new"
120 \bind "C-x 5 0"                "window-close"
121
122
123 # this is "upcase-region" in emacs
124 #\bind "C-x C-u"                "undo"
125 \bind "C-x C-w"                "buffer-write-as"
126
127 #bind "C-1"                    "------"
128 #bind "C-2"                    "------"
129 #bind "C-3"                    "------"
130 #bind "C-4"                    "------"
131 #bind "C-5"                    "------"
132 #bind "C-6"                    "------"
133 #bind "C-7"                    "------"
134 #bind "C-8"                    "------"
135 #bind "C-9"                    "------"
136 #bind "C-0"                    "------"
137
138 #bind "F1"                     "help"                          # Not yet implemented!
139 #bind "C-F1"                   "help-context"                  # Not yet implemented!
140 \bind "F2"                     "buffer-write force"
141 #\bind "F3"                    "file-open"
142 #bind "F4"                     "------"
143 #bind "F5"                     "------"
144 #bind "F6"                     "------"
145 #bind "F7"                     "------"
146 #bind "F8"                     "------"
147 #bind "F9"                     "------"
148 #bind "F10"                    "------"
149
150 \bind "M-x"                     "command-execute"
151 \bind "C-M-o"                   "dialog-show toc"
152
153 \bind "M-equal"                 "buffer-zoom-in"
154 \bind "M-plus"                  "buffer-zoom-in"
155 \bind "M-minus"                 "buffer-zoom-out"
156
157 #
158 # Motion group
159 #
160
161 \bind "M-Up"                    "command-alternatives outline-up; paragraph-move-up; tabular-feature move-row-up"
162 \bind "M-Down"                  "command-alternatives outline-down; paragraph-move-down; tabular-feature move-row-down"
163 \bind "M-Right"                 "tabular-feature move-column-right"
164 \bind "M-Left"                  "tabular-feature move-column-left"
165 \bind "C-Right"                 "word-right"
166 \bind "C-Left"                  "word-left"
167 \bind "C-Up"                    "paragraph-up"
168 \bind "C-Down"                  "paragraph-down"
169 \bind "Home"                    "buffer-begin"
170 \bind "End"                     "buffer-end"
171 \bind "M-~S-less"               "buffer-begin"
172 \bind "M-~S-greater"            "buffer-end"
173
174 \bind "C-~S-greater"            "label-goto"
175 \bind "C-~S-less"               "bookmark-goto 0"
176 \bind "C-~S-1"                  "bookmark-goto 1"
177 \bind "C-~S-2"                  "bookmark-goto 2"
178 \bind "C-~S-3"                  "bookmark-goto 3"
179 \bind "C-~S-4"                  "bookmark-goto 4"
180 \bind "C-~S-5"                  "bookmark-goto 5"
181 \bind "C-~S-6"                  "bookmark-goto 6"
182 \bind "C-~S-7"                  "bookmark-goto 7"
183 \bind "C-~S-8"                  "bookmark-goto 8"
184 \bind "C-~S-9"                  "bookmark-goto 9"
185 \bind "C-M-~S-1"                "bookmark-save 1"
186 \bind "C-M-~S-2"                "bookmark-save 2"
187 \bind "C-M-~S-3"                "bookmark-save 3"
188 \bind "C-M-~S-4"                "bookmark-save 4"
189 \bind "C-M-~S-5"                "bookmark-save 5"
190 \bind "C-M-~S-6"                "bookmark-save 6"
191 \bind "C-M-~S-7"                "bookmark-save 7"
192 \bind "C-M-~S-8"                "bookmark-save 8"
193 \bind "C-M-~S-9"                "bookmark-save 9"
194
195 # The below are xemacs bindings
196 #\bind "Home"                   "line-begin"
197 #\bind "End"                    "line-end"
198 #\bind "C-Home"                 "buffer-begin"
199 #\bind "C-End"                  "buffer-end"
200
201
202 #
203 # Motion + select group
204 #
205
206 \bind "S-Right"                "char-right-select"
207 \bind "S-Left"                 "char-left-select"
208 \bind "S-C-F"                  "char-forward-select"
209 \bind "S-C-B"                  "char-backward-select"
210 \bind "S-Up"                   "up-select"
211 \bind "S-Down"                 "down-select"
212 \bind "S-C-Right"              "word-right-select"
213 \bind "S-C-Left"               "word-left-select"
214 \bind "S-C-A"                  "line-begin-select"
215 \bind "S-C-E"                  "line-end-select"
216 \bind "S-C-Up"                 "paragraph-up-select"
217 \bind "S-C-Down"               "paragraph-down-select"
218 \bind "S-Home"                 "buffer-begin-select"
219 \bind "S-End"                  "buffer-end-select"
220 \bind "S-Prior"                "screen-up-select"
221 \bind "S-Next"                 "screen-down-select"
222 \bind "S-C-Home"               "buffer-begin-select"
223 \bind "S-C-End"                "buffer-end-select"
224
225 #
226 # Edit group
227 #
228
229 \bind "C-Delete"                "word-delete-forward confirm"
230 \bind "M-d"                     "word-delete-forward confirm"
231 \bind "C-BackSpace"             "word-delete-backward confirm"
232 \bind "M-Return"                "paragraph-break inverse"
233 \bind "C-Return"                "newline-insert newline"
234 \bind "C-S-Return"              "newline-insert linebreak"
235 \bind "M-S-Right"               "depth-increment"
236 \bind "M-S-Left"                "depth-decrement"
237 \bind "C-S-L"                   "specialchar-insert ligature-break"
238 \bind "C-space"                 "command-alternatives math-space ; space-insert protected"
239 \bind "nobreakspace"            "space-insert protected"
240 \bind "C-M-space"               "space-insert normal"
241 \bind "S-C-space"               "space-insert thin"
242 \bind "M-~S-slash"              "specialchar-insert slash"
243 \bind "C-~S-period"             "specialchar-insert end-of-sentence"
244 \bind "M-~S-period"             "specialchar-insert dots"
245 \bind "M-w"                     "copy"
246 \bind "Escape"                  "meta-prefix"
247 \bind "M-u"                     "word-upcase partial"
248 \bind "M-l"                     "word-lowcase partial"
249 # This conflicts with the character menu.
250 #bind "M-c"                     "word-capitalize partial"
251
252 # Numeric keypad (if Shift+KP_XXX does not switch the NumLock state)
253 \bind "S-KP_Right"              "char-right-select"
254 \bind "S-KP_Left"               "char-left-select"
255 \bind "S-KP_Up"                 "up-select"
256 \bind "S-KP_Down"               "down-select"
257 \bind "S-C-KP_Right"            "word-right-select"
258 \bind "S-C-KP_Left"             "word-left-select"
259 \bind "S-C-KP_Up"               "paragraph-up-select"
260 \bind "S-C-KP_Down"             "paragraph-down-select"
261 \bind "S-KP_Home"               "line-begin-select"
262 \bind "S-KP_End"                "line-end-select"
263 \bind "S-KP_Prior"              "screen-up-select"
264 \bind "S-KP_Next"               "screen-down-select"
265 \bind "S-C-KP_Home"             "buffer-begin-select"
266 \bind "S-C-KP_End"              "buffer-end-select"
267 \bind "S-C-KP_Prior"            "buffer-move-previous"
268 \bind "S-C-KP_Next"             "buffer-move-next"
269 \bind "C-x h"                   "command-sequence buffer-begin ; buffer-end-select"   # select all
270 \bind "M-h"                     "inset-select-all"
271 \bind "C-KP_Insert"             "copy"
272 \bind "S-KP_Insert"             "paste"
273 \bind "S-KP_Delete"             "cut"
274
275
276 # Include menu and math bindings
277
278 \bind_file menus.bind
279 \bind_file math.bind
280 \bind_file latinkeys.bind
281 \bind_file cyrkeys.bind
282 \bind_file greekkeys.bind
283
284 # the following bindings have to be adapted w.r.t. menus.bind
285 \bind "M-c Down"                "word-lowcase partial"
286 \bind "M-c Up"                  "word-upcase partial"
287 \bind "M-c Right"               "word-capitalize partial"
288