]> git.lyx.org Git - lyx.git/blob - lib/bind/xemacs.bind
- Math.lyx: - update math bold description to the new shortcuts
[lyx.git] / lib / bind / xemacs.bind
1 # -*- text -*-
2
3 # file xemacs.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 Dekel Tsur
13 # author Jürgen Vigna
14 # author Andrew Zabolotny
15
16 # Full author contact details are available in file CREDITS.
17
18 # This is the XEMACS flavour bind file, based on the bindings found
19 # in the XEmacs editor. It has many bindings identical to the
20 # Emacs binding file although there are a few significant changes.
21 #
22 #
23 # DO NOT CHANGE THIS DEFAULT BINDING FILE! It will be replaced
24 # with every new install of LyX and your changes will be lost.
25 # Instead, customize a copy of this file placed in
26 # ~/.lyx/bind/xemacs.bind
27 #
28 # Happy tuning!
29
30 \bind "C-~S-at"                 "mark-on"
31 \bind "C-a"                     "line-begin"
32 \bind "C-b"                     "char-backward"
33 #bind "C-c"                     "------" # see end of file
34 \bind "C-d"                     "char-delete-forward"
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"                    "------"
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"                    "next-inset-toggle"
49 \bind "C-p"                    "up"
50
51 # this is "quoted-insert" a total different meaning from "quote-insert"
52 \bind "C-q"                    "self-insert \""
53 #bind "C-r"                    "------"
54 \bind "C-s"                    "dialog-show findreplace"
55 \bind "M-~S-percent"            "dialog-show findreplace"
56
57 # should be "chars-transpose" (swaps two chars)
58 #bind "C-t"                    "------"
59
60 # universal argument in emacs
61 \bind "C-u"                    "font-underline"
62
63 # better name would be "scroll-up" as in emacs
64 \bind "C-v"                    "screen-down"
65 \bind "M-v"                    "screen-up"
66
67 \bind "C-w"                    "cut"
68 #bind "C-x"                    "------"
69 \bind "C-y"                    "paste"
70
71 #should be "lyx-iconify"
72 #bind "C-z"                    "------"   # see end of file
73
74 \bind "C-~S-slash"             "undo"
75 \bind "C-~S-underscore"        "undo"
76
77 \bind "~S-M-quotedbl"           "quote-insert single"
78 \bind "~S-C-quotedbl"           "self-insert \""
79
80 \bind "C-x a"                  "buffer-auto-save"
81 # not currently supported
82 #\bind "C-x b"                 "buffer-previous"
83 \bind "C-x d"                  "buffer-new"
84 \bind "C-x g"                  "buffer-view ps"
85 \bind "C-x k"                  "buffer-close"
86 \bind "C-x p"                  "buffer-view dvi"
87 \bind "C-x r"                  "buffer-update dvi"
88 # Should have been "buffer-write-some"
89 # \bind "C-x s"                  "buffer-write"
90 \bind "C-x t"                  "buffer-update dvi"
91 \bind "C-x u"                  "undo"
92 \bind "C-x v h"                "dialog-show vclog"
93 \bind "C-x v v"                "vc-check-in"
94 \bind "C-x v u"                "vc-revert"
95 \bind "C-x v c"                "vc-undo-last"
96 \bind "C-x v i"                "vc-register"
97 #\bind "C-x w"                  "buffer-write-as"
98 \bind "C-x bracketleft"        "screen-up"
99 \bind "C-x bracketright"       "screen-down"
100 \bind "C-x C-a"                "buffer-auto-save"
101 \bind "C-x C-b"                "menu-open view" # list all buffers
102 \bind "C-x C-c"                "lyx-quit"
103 \bind "C-x C-d"                "buffer-new"
104 \bind "C-x C-f"                "file-open"
105 \bind "C-x C-g"                "buffer-view ps"
106 \bind "C-x C-l"                 "word-lowcase"          # downcase-region!
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-x C-u"                 "word-upcase"           # upcase-region!
113 \bind "C-x C-w"                "buffer-write-as"
114 \bind "C-Next"                 "buffer-next"
115 \bind "C-Prior"                "buffer-previous"
116
117 #bind "C-1"                    "------"
118 #bind "C-2"                    "------"
119 #bind "C-3"                    "------"
120 #bind "C-4"                    "------"
121 #bind "C-5"                    "------"
122 #bind "C-6"                    "------"
123 #bind "C-7"                    "------"
124 #bind "C-8"                    "------"
125 #bind "C-9"                    "------"
126 #bind "C-0"                    "------"
127
128 #bind "F1"                     "help"                          # Not yet implemented!
129 #bind "C-F1"                   "help-context"                  # Not yet implemented!
130 #\bind "F2"                     "buffer-write"
131 #\bind "F3"                     "file-open"
132 #bind "F4"                     "------"
133 #bind "F5"                     "------"
134 #bind "F6"                     "------"
135 #bind "F7"                     "------"
136 #bind "F8"                     "------"
137 #bind "F9"                     "------"
138 #bind "F10"                    "------"
139
140 \bind "M-x"                     "command-execute"
141
142
143 #
144 # Motion group
145 #
146
147 \bind "M-Up"                    "paragraph-move-up"
148 \bind "M-Down"                  "paragraph-move-down"
149 \bind "C-Right"                "word-right"
150 \bind "C-Left"                 "word-left"
151 \bind "C-Up"                   "paragraph-up"
152 \bind "C-Down"                 "paragraph-down"
153 \bind "M-bracketleft"          "paragraph-up"
154 \bind "M-bracketright"         "paragraph-down"
155 \bind "Home"                   "line-begin"
156 \bind "End"                    "line-end"
157 \bind "C-Home"                 "buffer-begin"
158 \bind "C-End"                  "buffer-end"
159 \bind "M-~S-less"              "buffer-begin"
160 \bind "M-~S-greater"           "buffer-end"
161
162 \bind "Prior"                  "screen-up"
163 \bind "Next"                   "screen-down"
164
165 # A bit like autoindent in c-mode
166 \bind "Tab"                     "depth-increment"
167
168 \bind "C-~S-greater"            "label-goto"
169 \bind "C-~S-less"               "bookmark-goto 0"
170 \bind "C-~S-1"                  "bookmark-goto 1"
171 \bind "C-~S-2"                  "bookmark-goto 2"
172 \bind "C-~S-3"                  "bookmark-goto 3"
173 \bind "C-~S-4"                  "bookmark-goto 4"
174 \bind "C-~S-5"                  "bookmark-goto 5"
175 \bind "C-~S-6"                  "bookmark-goto 6"
176 \bind "C-~S-7"                  "bookmark-goto 7"
177 \bind "C-~S-8"                  "bookmark-goto 8"
178 \bind "C-~S-9"                  "bookmark-goto 9"
179 \bind "C-M-~S-1"                "bookmark-save 1"
180 \bind "C-M-~S-2"                "bookmark-save 2"
181 \bind "C-M-~S-3"                "bookmark-save 3"
182 \bind "C-M-~S-4"                "bookmark-save 4"
183 \bind "C-M-~S-5"                "bookmark-save 5"
184 \bind "C-M-~S-6"                "bookmark-save 6"
185 \bind "C-M-~S-7"                "bookmark-save 7"
186 \bind "C-M-~S-8"                "bookmark-save 8"
187 \bind "C-M-~S-9"                "bookmark-save 9"
188
189
190
191 #
192 # Motion + select group
193 #
194
195 \bind "S-Right"                "char-right-select"
196 \bind "S-Left"                 "char-left-select"
197 \bind "S-C-F"                  "char-forward-select"
198 \bind "S-C-B"                  "char-backward-select"
199 \bind "S-Up"                   "up-select"
200 \bind "S-Down"                 "down-select"
201 \bind "S-C-Right"              "word-right-select"
202 \bind "S-C-Left"               "word-left-select"
203 \bind "S-C-Up"                 "paragraph-up-select"
204 \bind "S-C-Down"               "paragraph-down-select"
205 \bind "S-Home"                 "line-begin-select"
206 \bind "S-End"                  "line-end-select"
207 \bind "S-C-A"                  "line-begin-select"
208 \bind "S-C-E"                  "line-end-select"
209 \bind "S-Prior"                "screen-up-select"
210 \bind "S-Next"                 "screen-down-select"
211 \bind "S-C-Home"               "buffer-begin-select"
212 \bind "S-C-End"                "buffer-end-select"
213
214 #
215 # Edit group
216 #
217
218 \bind "M-Delete"                "word-delete-backward"
219 \bind "C-Delete"                "word-delete-forward"
220 \bind "M-d"                     "word-delete-forward"
221 \bind "C-BackSpace"             "word-delete-backward"
222 \bind "M-Return"                "break-paragraph inverse"
223 \bind "C-Return"                "newline-insert newline"
224 \bind "C-S-Return"              "newline-insert linebreak"
225 \bind "C-S-L"                   "specialchar-insert ligature-break"
226 \bind "C-space"                 "space-insert protected"
227 \bind "C-M-space"               "space-insert normal"
228 \bind "S-C-space"               "space-insert thin"
229 \bind "C-S-slash"               "specialchar-insert slash"
230 \bind "C-period"                "specialchar-insert end-of-sentence"
231 \bind "M-period"                "specialchar-insert dots"
232 \bind "M-w"                     "copy"
233 \bind "Escape"                  "meta-prefix"
234
235 # Numeric keypad (if Shift+KP_XXX does not switch the NumLock state)
236 \bind "S-KP_Right"              "char-right-select"
237 \bind "S-KP_Left"               "char-left-select"
238 \bind "S-KP_Up"                 "up-select"
239 \bind "S-KP_Down"               "down-select"
240 \bind "S-C-KP_Right"            "word-right-select"
241 \bind "S-C-KP_Left"             "word-left-select"
242 \bind "S-C-KP_Up"               "paragraph-up-select"
243 \bind "S-C-KP_Down"             "paragraph-down-select"
244 \bind "S-KP_Home"               "line-begin-select"
245 \bind "S-KP_End"                "line-end-select"
246 \bind "S-KP_Prior"              "screen-up-select"
247 \bind "S-KP_Next"               "screen-down-select"
248 \bind "S-C-KP_Home"             "buffer-begin-select"
249 \bind "S-C-KP_End"              "buffer-end-select"
250 \bind "S-C-KP_Prior"            "buffer-begin-select"
251 \bind "S-C-KP_Next"             "buffer-end-select"
252 \bind "C-KP_Insert"             "copy"
253 \bind "S-KP_Insert"             "paste"
254 \bind "S-KP_Delete"             "cut"
255
256
257 ## Trying to incorporate the best of AucTeX and HM--HTML modes
258 ##
259 # "C-z" is used in HM--HTML-mode for paragraph styles so try to support
260 #  similar here.
261 ##
262 \bind "C-c C-l"                 "dialog-show latexlog"        # show warning log
263 \bind "C-c C-v"                 "buffer-chktex"         # validate
264
265 \bind "C-z space"               "drop-layouts-choice"
266 \bind "C-z 1"                   "layout Title"
267 \bind "C-z 2"                   "layout Section"
268 \bind "C-z 3"                   "layout Subsection"
269 \bind "C-z 4"                   "layout Subsubsection"
270 \bind "C-z 5"                   "layout Paragraph"
271 \bind "C-z 6"                   "layout Subparagraph"
272 \bind "C-z a"                   "layout Author"         # address!!
273 \bind "C-z S-A"                 "layout Abstract"
274 \bind "C-z c"                   "layout LyX-Code"
275 \bind "C-z b"                   "font-bold"
276 \bind "C-z d"                   "layout Description"
277 \bind "C-z S-D"                 "layout Date"
278 \bind "C-z e"                   "font-emph"
279 \bind "C-z i"                   "layout Itemize"        # smart-insert-item!!
280 \bind "C-z o"                   "font-emph"             # italic!
281 \bind "C-z q"                   "layout Quote"
282 \bind "C-z s"                   "font-bold"             # strong!
283 \bind "C-c t"                   "font-sans"             # typewriter!
284 \bind "C-c v"                   "font-roman"            # variable!
285 \bind "C-z S-V"                 "layout Verbatim"
286
287 \bind "C-z l d"                 "layout Description"
288 \bind "C-z l t"                 "layout Description"
289 \bind "C-z l o"                 "layout Enumerate"      # numbered list
290 \bind "C-z l l"                 "layout Itemize"        # bulleted list
291 \bind "C-z l u"                 "layout Itemize"        # bulleted list
292 #
293 ## End HM--HTML Mode
294 ##
295 ## Start AucTeX
296 #
297 #\bind "C-u C-c C-f"            "layout-character"
298 \bind "C-c C-f C-b"             "font-bold"
299 \bind "C-c C-f C-c"             "font-noun"
300 \bind "C-c C-f C-e"             "font-emph"
301 \bind "C-c C-f C-i"             "font-emph" #italic
302 \bind "C-c C-f C-s"             "font-emph" #slanted
303
304 \bind "C-c C-f C-f"             "font-sans"
305 \bind "C-c C-f C-r"             "font-roman"
306 \bind "C-c C-f C-t"             "font-typewriter"  #typewriter
307
308 \bind "C-c ~S-asciitilde"               "math-mode"
309
310 \bind "C-c C-s 0"               "layout Standard"
311 \bind "C-c C-s 1"               "layout Chapter"
312 \bind "C-c C-s 2"               "layout Section"
313 \bind "C-c C-s 3"               "layout Subsection"
314 \bind "C-c C-s 4"               "layout Subsubsection"
315 \bind "C-c C-s 5"               "layout Paragraph"
316 \bind "C-c C-s 6"               "layout Subparagraph"
317 \bind "C-c C-e a"               "layout Abstract"
318 \bind "C-c C-e d"               "layout Description"
319 \bind "C-c C-e e"               "layout Enumerate"
320 \bind "C-c C-e i"               "layout Itemize"
321 \bind "C-c C-e l"               "layout List"
322 \bind "C-c C-e m"               "math-display"  # should this be math-mode?
323 \bind "C-c C-e q"               "layout Quote"
324 \bind "C-c C-e S-q"             "layout Quotation"
325 \bind "C-c C-e v"               "layout Quote"
326
327 \bind "C-c C-e f"               "dialog-show-new-inset graphics"  ## should be figure-float
328 \bind "C-c C-e t"               "tabular-insert" ## should be table-float
329
330 \bind "C-c percent"             "layout Comment"
331
332 \bind "C-c Return"              "break-paragraph inverse"
333 #
334 ## End AucTeX
335 #
336 ## Start TeX mode, some overlap with AucTeX mode
337 #
338 \bind "C-c C-b"                 "buffer-update dvi"
339 \bind "C-c C-p"                 "dialog-show print"
340 \bind "C-c C-r"                 "buffer-update dvi"     # tex region
341 #
342 ## End TeX mode
343 #
344
345 ################################
346 # Include menu and math bindings
347
348 \bind_file menus.bind
349 \bind_file math.bind
350 \bind_file latinkeys.bind
351 \bind_file cyrkeys.bind
352 \bind_file greekkeys.bind