]> git.lyx.org Git - lyx.git/blob - lib/bind/xemacs.bind
include latinkeys.bind
[lyx.git] / lib / bind / xemacs.bind
1 # This file is part of
2 # ==================================================================
3 #
4 #                   LyX, the High Level Word Processor
5
6 #                  Copyright (C) 1995-1997 The LyX Team
7 #
8 #               THIS FILE DEFINES THE XEMACS LYX BINDINGS
9 #
10 # ==================================================================
11
12 #
13 # This is the XEMACS flavour bind file, based on the bindings found 
14 # in the XEmacs editor. It has many bindings identical to the
15 # Emacs binding file although there are a few significant changes.
16 #
17 #
18 # DO NOT CHANGE THIS DEFAULT BINDING FILE! It will be replaced
19 # with every new install of LyX and your changes will be lost. 
20 # Instead, customize a copy of this file placed in 
21 # ~/.lyx/bind/xemacs.bind
22 #
23 # Happy tuning!
24
25 \bind "C-~S-at"                 "mark-on"
26 \bind "C-a"                     "line-begin"
27 \bind "C-b"                     "char-backward"
28 #bind "C-c"                     "------" # see end of file
29 \bind "C-d"                     "delete-forward"
30 \bind "C-e"                     "line-end"
31 \bind "C-f"                     "char-forward"
32 \bind "C-g"                     "cancel"
33
34 # help in emacs
35 \bind "C-h"                    "hyphenation-point-insert" 
36 \bind "C-i"                    "hfill-insert"
37 #bind "C-j"                    "------"
38 \bind "C-k"                    "line-delete-forward"
39 \bind "C-l"                    "screen-recenter"
40 \bind "C-m"                    "mark-toggle"
41 \bind "C-n"                    "down"
42 \bind "C-o"                    "open-stuff"
43 \bind "C-p"                    "up"
44
45 # this is "quoted-insert" a total different meaning from "quote-insert"
46 \bind "C-q"                    "quote-insert"
47 #bind "C-r"                    "------"
48 \bind "C-s"                    "find-replace"
49 \bind "M-~S-percent"            "find-replace"
50
51 # should be "chars-transpose" (swaps two chars)
52 #bind "C-t"                    "------"
53
54 # universal argument in emacs
55 \bind "C-u"                    "font-underline"
56
57 # better name would be "scroll-up" as in emacs
58 \bind "C-v"                    "screen-down"
59 \bind "M-v"                    "screen-up"
60
61 \bind "C-w"                    "cut"
62 #bind "C-x"                    "------"
63 \bind "C-y"                    "paste"
64 \bind "C-S-Y"                  "layout-paste"
65
66 #should be "lyx-iconify"
67 #bind "C-z"                    "------"   # see end of file
68
69 \bind "C-~S-slash"             "undo"
70 \bind "C-~S-underscore"        "undo"
71
72 \bind "S-C-quotedbl"           "quote-insert"
73
74 \bind "C-x a"                  "buffer-auto-save"
75 # not currently supported
76 #\bind "C-x b"                 "buffer-previous"
77 \bind "C-x d"                  "buffer-new"
78 \bind "C-x g"                  "buffer-view ps"
79 \bind "C-x k"                  "buffer-close"
80 \bind "C-x p"                  "buffer-view dvi"
81 \bind "C-x r"                  "buffer-update dvi"
82 # Should have been "buffer-write-some"
83 # \bind "C-x s"                  "buffer-write"
84 \bind "C-x t"                  "buffer-update dvi"
85 \bind "C-x u"                  "undo"
86 \bind "C-x v h"                "vc-history"
87 \bind "C-x v v"                "vc-check-in"
88 \bind "C-x v u"                "vc-revert"
89 \bind "C-x v c"                "vc-undo-last"
90 \bind "C-x v i"                "vc-register"
91 #\bind "C-x w"                  "buffer-write-as"
92 \bind "C-x bracketleft"        "screen-up"
93 \bind "C-x bracketright"       "screen-down"
94 \bind "C-x quoteleft"           "error-next"
95 \bind "C-x C-a"                "buffer-auto-save"
96 \bind "C-x C-b"                "menu-open documents"    # list all buffers
97 \bind "C-x C-c"                "lyx-quit"
98 \bind "C-x C-d"                "buffer-new"
99 \bind "C-x C-f"                "file-open"
100 \bind "C-x C-g"                "buffer-view ps"
101 \bind "C-x C-l"                 "word-lowcase"          # downcase-region!
102 \bind "C-x C-p"                "buffer-view dvi"
103 \bind "C-x C-q"                "buffer-toggle-read-only"
104 #\bind "C-x C-r"                "buffer-update dvi"
105 \bind "C-x C-s"                "buffer-write"
106 \bind "C-x C-t"                "buffer-update dvi"
107 \bind "C-x C-u"                 "word-upcase"           # upcase-region!
108 \bind "C-x C-w"                "buffer-write-as"
109
110 #bind "C-1"                    "------"
111 #bind "C-2"                    "------"
112 #bind "C-3"                    "------"
113 #bind "C-4"                    "------"
114 #bind "C-5"                    "------"
115 #bind "C-6"                    "------"
116 #bind "C-7"                    "------"
117 #bind "C-8"                    "------"
118 #bind "C-9"                    "------"
119 #bind "C-0"                    "------"
120
121 #bind "F1"                     "help"                          # Not yet implemented!
122 #bind "C-F1"                   "help-context"                  # Not yet implemented!
123 #\bind "F2"                     "buffer-write"
124 #\bind "F3"                     "file-open"
125 #bind "F4"                     "------"
126 #bind "F5"                     "------"
127 #bind "F6"                     "------"
128 #bind "F7"                     "------"
129 #bind "F8"                     "------"
130 #bind "F9"                     "------"
131 #bind "F10"                    "------"
132
133 \bind "M-x"                     "command-execute"
134
135
136 #
137 # Motion group
138 #
139
140 \bind "C-Right"                "word-forward"
141 \bind "C-Left"                 "word-backward"
142 \bind "C-Up"                   "paragraph-up"
143 \bind "C-Down"                 "paragraph-down"
144 \bind "M-bracketleft"          "paragraph-up"
145 \bind "M-bracketright"         "paragraph-down"
146 \bind "Home"                   "line-begin"
147 \bind "End"                    "line-end"
148 \bind "C-Home"                 "buffer-begin"
149 \bind "C-End"                  "buffer-end"
150 \bind "M-~S-less"              "buffer-begin"
151 \bind "M-~S-greater"           "buffer-end"
152
153 \bind "Prior"                  "screen-up"
154 \bind "Next"                   "screen-down"
155
156 # A bit like autoindent in c-mode
157 \bind "Tab"                     "depth-next"
158
159 \bind "C-~S-greater"            "reference-goto"
160 \bind "C-~S-less"               "bookmark-goto 0"
161 \bind "C-~S-1"                  "bookmark-goto 1"
162 \bind "C-~S-2"                  "bookmark-goto 2"
163 \bind "C-~S-3"                  "bookmark-goto 3"
164 \bind "C-M-~S-1"                "bookmark-save 1"
165 \bind "C-M-~S-2"                "bookmark-save 2"
166 \bind "C-M-~S-3"                "bookmark-save 3"
167
168 #
169 # Motion + select group
170 #
171
172 \bind "S-Right"                "forward-select"
173 \bind "S-Left"                 "backward-select"
174 \bind "S-C-F"                  "forward-select"
175 \bind "S-C-B"                  "backward-select"
176 \bind "S-Up"                   "up-select"
177 \bind "S-Down"                 "down-select"
178 \bind "S-C-Right"              "word-forward-select"
179 \bind "S-C-Left"               "word-backward-select"
180 \bind "S-C-Up"                 "paragraph-up-select"
181 \bind "S-C-Down"               "paragraph-down-select"
182 \bind "S-Home"                 "line-begin-select"
183 \bind "S-End"                  "line-end-select"
184 \bind "S-C-A"                  "line-begin-select"
185 \bind "S-C-E"                  "line-end-select"
186 \bind "S-Prior"                "screen-up-select"
187 \bind "S-Next"                 "screen-down-select"
188 \bind "S-C-Home"               "buffer-begin-select"
189 \bind "S-C-End"                "buffer-end-select"
190
191
192 #
193 # Edit group
194 #
195
196 \bind "M-Delete"                "word-delete-backward"
197 \bind "C-Delete"                "word-delete-forward"
198 \bind "M-d"                     "word-delete-forward"
199 \bind "C-BackSpace"             "word-delete-backward"
200 \bind "M-Return"                "break-paragraph-keep-layout"
201 \bind "C-Return"                "break-line"
202 \bind "C-space"                 "protected-space-insert"
203 \bind "C-period"                "end-of-sentence-period-insert"
204 \bind "M-period"                "dots-insert"
205 \bind "M-w"                     "copy"
206 \bind "M-S-W"                   "layout-copy"
207 \bind "Escape"                  "meta-prefix"
208
209 ## Trying to incorporate the best of AucTeX and HM--HTML modes
210 ##
211 # "C-z" is used in HM--HTML-mode for paragraph styles so try to support
212 #  similar here especially for LinuxDoc (although LinuxDoc isn't only for
213 #  making HTML).
214 ##
215 \bind "C-c C-l"                 "latex-view-log"        # show warning log
216 \bind "C-c C-o"                 "error-next"
217 \bind "C-c C-v"                 "buffer-chktex"         # validate
218
219 \bind "C-z space"               "drop-layouts-choice"
220 \bind "C-z 1"                   "layout Title" 
221 \bind "C-z 2"                   "layout Section" 
222 \bind "C-z 3"                   "layout Subsection"  
223 \bind "C-z 4"                   "layout Subsubsection"    
224 \bind "C-z 5"                   "layout Paragraph"        
225 \bind "C-z 6"                   "layout Subparagraph"
226 \bind "C-z a"                   "layout Author"         # address!!
227 \bind "C-z S-A"                 "layout Abstract"
228 \bind "C-z c"                   "layout LyX-Code"
229 \bind "C-z b"                   "font-bold"
230 \bind "C-z d"                   "layout Description"
231 \bind "C-z S-D"                 "layout Date"
232 \bind "C-z e"                   "font-emph"
233 \bind "C-z i"                   "layout Itemize"        # smart-insert-item!!
234 \bind "C-z o"                   "font-emph"             # italic!
235 \bind "C-z q"                   "layout Quote"
236 \bind "C-z s"                   "font-bold"             # strong!
237 \bind "C-c t"                   "font-sans"             # typewriter!
238 \bind "C-c v"                   "font-roman"            # variable!
239 \bind "C-z S-V"                 "layout Verbatim"
240
241 \bind "C-z l d"                 "layout Description"
242 \bind "C-z l t"                 "layout Description"
243 \bind "C-z l o"                 "layout Enumerate"      # numbered list
244 \bind "C-z l l"                 "layout Itemize"        # bulleted list
245 \bind "C-z l u"                 "layout Itemize"        # bulleted list
246 #
247 ## End HM--HTML Mode
248 ##
249 ## Start AucTeX
250 #
251 #\bind "C-u C-c C-f"            "layout-character"
252 \bind "C-c C-f C-b"             "font-bold"
253 \bind "C-c C-f C-c"             "font-noun"
254 \bind "C-c C-f C-e"             "font-emph"
255 \bind "C-c C-f C-i"             "font-emph" #italic
256 \bind "C-c C-f C-s"             "font-emph" #slanted
257
258 \bind "C-c C-f C-f"             "font-sans"
259 \bind "C-c C-f C-r"             "font-roman"
260 \bind "C-c C-f C-t"             "font-code"  #typewriter
261
262 \bind "C-c ~S-asciitilde"               "math-mode"
263
264 \bind "C-c quoteleft"           "error-next"
265
266 \bind "C-c C-s 0"               "layout Standard"
267 \bind "C-c C-s 1"               "layout Chapter"
268 \bind "C-c C-s 2"               "layout Section"
269 \bind "C-c C-s 3"               "layout Subsection"
270 \bind "C-c C-s 4"               "layout Subsubsection"
271 \bind "C-c C-s 5"               "layout Paragraph"
272 \bind "C-c C-s 6"               "layout Subparagraph"
273 \bind "C-c C-e a"               "layout Abstract"
274 \bind "C-c C-e d"               "layout Description"
275 \bind "C-c C-e e"               "layout Enumerate"
276 \bind "C-c C-e i"               "layout Itemize"
277 \bind "C-c C-e l"               "layout List"
278 \bind "C-c C-e m"               "math-display"  # should this be math-mode?
279 \bind "C-c C-e q"               "layout Quote"
280 \bind "C-c C-e S-q"             "layout Quotation"
281 \bind "C-c C-e v"               "layout Quote"
282
283 \bind "C-c C-e f"               "figure-insert"  ## should be figure-float
284 \bind "C-c C-e t"               "dialog-tabular-insert" ## should be table-float
285
286 \bind "C-c percent"             "layout Comment"
287
288 \bind "C-c Return"              "break-paragraph-keep-layout"
289 #
290 ## End AucTeX
291 #
292 ## Start TeX mode, some overlap with AucTeX mode
293 #
294 \bind "C-c C-b"                 "buffer-update dvi"
295 \bind "C-c C-p"                 "buffer-print"
296 \bind "C-c C-r"                 "buffer-update dvi"     # tex region
297 #
298 ## End TeX mode
299 #
300
301 ################################
302 # Include menu and math bindings
303
304 \bind_file menus.bind
305 \bind_file math.bind
306 \bind_file latinkeys.bind