]> git.lyx.org Git - lyx.git/blob - lib/bind/xemacs.bind
* src/paragraph_funcs.cpp (breakParagraph): change parameter 'flag' to
[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"                     "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"                    "hyphenation-point-insert"
41 \bind "C-i"                    "hfill-insert"
42 #bind "C-j"                    "------"
43 \bind "C-k"                    "line-delete-forward"
44 \bind "C-l"                    "screen-recenter"
45 \bind "C-m"                    "mark-toggle"
46 \bind "C-n"                    "down"
47 \bind "C-o"                    "next-inset-toggle"
48 \bind "C-p"                    "up"
49
50 # this is "quoted-insert" a total different meaning from "quote-insert"
51 \bind "C-q"                    "self-insert \""
52 #bind "C-r"                    "------"
53 \bind "C-s"                    "dialog-show findreplace"
54 \bind "M-~S-percent"            "dialog-show findreplace"
55
56 # should be "chars-transpose" (swaps two chars)
57 #bind "C-t"                    "------"
58
59 # universal argument in emacs
60 \bind "C-u"                    "font-underline"
61
62 # better name would be "scroll-up" as in emacs
63 \bind "C-v"                    "screen-down"
64 \bind "M-v"                    "screen-up"
65
66 \bind "C-w"                    "cut"
67 #bind "C-x"                    "------"
68 \bind "C-y"                    "paste"
69
70 #should be "lyx-iconify"
71 #bind "C-z"                    "------"   # see end of file
72
73 \bind "C-~S-slash"             "undo"
74 \bind "C-~S-underscore"        "undo"
75
76 \bind "~S-M-quotedbl"           "quote-insert single"
77 \bind "~S-C-quotedbl"           "self-insert \""
78
79 \bind "C-x a"                  "buffer-auto-save"
80 # not currently supported
81 #\bind "C-x b"                 "buffer-previous"
82 \bind "C-x d"                  "buffer-new"
83 \bind "C-x g"                  "buffer-view ps"
84 \bind "C-x k"                  "buffer-close"
85 \bind "C-x p"                  "buffer-view dvi"
86 \bind "C-x r"                  "buffer-update dvi"
87 # Should have been "buffer-write-some"
88 # \bind "C-x s"                  "buffer-write"
89 \bind "C-x t"                  "buffer-update dvi"
90 \bind "C-x u"                  "undo"
91 \bind "C-x v h"                "dialog-show vclog"
92 \bind "C-x v v"                "vc-check-in"
93 \bind "C-x v u"                "vc-revert"
94 \bind "C-x v c"                "vc-undo-last"
95 \bind "C-x v i"                "vc-register"
96 #\bind "C-x w"                  "buffer-write-as"
97 \bind "C-x bracketleft"        "screen-up"
98 \bind "C-x bracketright"       "screen-down"
99 \bind "C-x quoteleft"           "error-next"
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-forward"
150 \bind "C-Left"                 "word-backward"
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"                "forward-select"
196 \bind "S-Left"                 "backward-select"
197 \bind "S-C-F"                  "forward-select"
198 \bind "S-C-B"                  "backward-select"
199 \bind "S-Up"                   "up-select"
200 \bind "S-Down"                 "down-select"
201 \bind "S-C-Right"              "word-forward-select"
202 \bind "S-C-Left"               "word-backward-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"                "break-line"
224 \bind "C-S-L"                   "ligature-break-insert"
225 \bind "C-space"                 "space-insert protected"
226 \bind "C-M-space"               "space-insert normal"
227 \bind "S-C-space"               "space-insert thin"
228 \bind "C-period"                "end-of-sentence-period-insert"
229 \bind "M-period"                "dots-insert"
230 \bind "M-w"                     "copy"
231 \bind "Escape"                  "meta-prefix"
232
233 # Numeric keypad (if Shift+KP_XXX does not switch the NumLock state)
234 \bind "S-KP_Right"              "forward-select"
235 \bind "S-KP_Left"               "backward-select"
236 \bind "S-KP_Up"                 "up-select"
237 \bind "S-KP_Down"               "down-select"
238 \bind "S-C-KP_Right"            "word-forward-select"
239 \bind "S-C-KP_Left"             "word-backward-select"
240 \bind "S-C-KP_Up"               "paragraph-up-select"
241 \bind "S-C-KP_Down"             "paragraph-down-select"
242 \bind "S-KP_Home"               "line-begin-select"
243 \bind "S-KP_End"                "line-end-select"
244 \bind "S-KP_Prior"              "screen-up-select"
245 \bind "S-KP_Next"               "screen-down-select"
246 \bind "S-C-KP_Home"             "buffer-begin-select"
247 \bind "S-C-KP_End"              "buffer-end-select"
248 \bind "S-C-KP_Prior"            "buffer-begin-select"
249 \bind "S-C-KP_Next"             "buffer-end-select"
250 \bind "C-KP_Insert"             "copy"
251 \bind "S-KP_Insert"             "paste"
252 \bind "S-KP_Delete"             "cut"
253
254
255 ## Trying to incorporate the best of AucTeX and HM--HTML modes
256 ##
257 # "C-z" is used in HM--HTML-mode for paragraph styles so try to support
258 #  similar here.
259 ##
260 \bind "C-c C-l"                 "dialog-show latexlog"        # show warning log
261 \bind "C-c C-o"                 "error-next"
262 \bind "C-c C-v"                 "buffer-chktex"         # validate
263
264 \bind "C-z space"               "drop-layouts-choice"
265 \bind "C-z 1"                   "layout Title"
266 \bind "C-z 2"                   "layout Section"
267 \bind "C-z 3"                   "layout Subsection"
268 \bind "C-z 4"                   "layout Subsubsection"
269 \bind "C-z 5"                   "layout Paragraph"
270 \bind "C-z 6"                   "layout Subparagraph"
271 \bind "C-z a"                   "layout Author"         # address!!
272 \bind "C-z S-A"                 "layout Abstract"
273 \bind "C-z c"                   "layout LyX-Code"
274 \bind "C-z b"                   "font-bold"
275 \bind "C-z d"                   "layout Description"
276 \bind "C-z S-D"                 "layout Date"
277 \bind "C-z e"                   "font-emph"
278 \bind "C-z i"                   "layout Itemize"        # smart-insert-item!!
279 \bind "C-z o"                   "font-emph"             # italic!
280 \bind "C-z q"                   "layout Quote"
281 \bind "C-z s"                   "font-bold"             # strong!
282 \bind "C-c t"                   "font-sans"             # typewriter!
283 \bind "C-c v"                   "font-roman"            # variable!
284 \bind "C-z S-V"                 "layout Verbatim"
285
286 \bind "C-z l d"                 "layout Description"
287 \bind "C-z l t"                 "layout Description"
288 \bind "C-z l o"                 "layout Enumerate"      # numbered list
289 \bind "C-z l l"                 "layout Itemize"        # bulleted list
290 \bind "C-z l u"                 "layout Itemize"        # bulleted list
291 #
292 ## End HM--HTML Mode
293 ##
294 ## Start AucTeX
295 #
296 #\bind "C-u C-c C-f"            "layout-character"
297 \bind "C-c C-f C-b"             "font-bold"
298 \bind "C-c C-f C-c"             "font-noun"
299 \bind "C-c C-f C-e"             "font-emph"
300 \bind "C-c C-f C-i"             "font-emph" #italic
301 \bind "C-c C-f C-s"             "font-emph" #slanted
302
303 \bind "C-c C-f C-f"             "font-sans"
304 \bind "C-c C-f C-r"             "font-roman"
305 \bind "C-c C-f C-t"             "font-typewriter"  #typewriter
306
307 \bind "C-c ~S-asciitilde"               "math-mode"
308
309 \bind "C-c quoteleft"           "error-next"
310
311 \bind "C-c C-s 0"               "layout Standard"
312 \bind "C-c C-s 1"               "layout Chapter"
313 \bind "C-c C-s 2"               "layout Section"
314 \bind "C-c C-s 3"               "layout Subsection"
315 \bind "C-c C-s 4"               "layout Subsubsection"
316 \bind "C-c C-s 5"               "layout Paragraph"
317 \bind "C-c C-s 6"               "layout Subparagraph"
318 \bind "C-c C-e a"               "layout Abstract"
319 \bind "C-c C-e d"               "layout Description"
320 \bind "C-c C-e e"               "layout Enumerate"
321 \bind "C-c C-e i"               "layout Itemize"
322 \bind "C-c C-e l"               "layout List"
323 \bind "C-c C-e m"               "math-display"  # should this be math-mode?
324 \bind "C-c C-e q"               "layout Quote"
325 \bind "C-c C-e S-q"             "layout Quotation"
326 \bind "C-c C-e v"               "layout Quote"
327
328 \bind "C-c C-e f"               "dialog-show-new-inset graphics"  ## should be figure-float
329 \bind "C-c C-e t"               "tabular-insert" ## should be table-float
330
331 \bind "C-c percent"             "layout Comment"
332
333 \bind "C-c Return"              "break-paragraph inverse"
334 #
335 ## End AucTeX
336 #
337 ## Start TeX mode, some overlap with AucTeX mode
338 #
339 \bind "C-c C-b"                 "buffer-update dvi"
340 \bind "C-c C-p"                 "dialog-show print"
341 \bind "C-c C-r"                 "buffer-update dvi"     # tex region
342 #
343 ## End TeX mode
344 #
345
346 ################################
347 # Include menu and math bindings
348
349 \bind_file menus.bind
350 \bind_file math.bind
351 \bind_file latinkeys.bind
352 \bind_file cyrkeys.bind
353 \bind_file greekkeys.bind