]> git.lyx.org Git - lyx.git/blob - lib/bind/emacs.bind
correct a typo in filename
[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 4
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"
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 \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 "C-S-s"                  "dialog-show findreplaceadv"
56 \bind "M-~S-percent"           "dialog-show findreplaceadv"
57
58 \bind "C-t"                    "chars-transpose"
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
66 \bind "C-w"                    "cut"
67 #bind "C-x"                    "------"
68 \bind "C-y"                    "paste"
69
70 #should be "lyx-iconify"
71 #bind "C-z"                    "------"
72
73 \bind "C-~S-slash"             "undo"
74 \bind "C-~S-underscore"        "undo"
75
76 \bind "~S-M-quotedbl"           "quote-insert inner"
77 \bind "~S-C-quotedbl"           "quote-insert outer auto plain"
78
79 \bind "C-x a"                  "buffer-auto-save"
80 #\bind "C-x b"                 "buffer-previous"
81 \bind "C-x d"                  "buffer-new"
82 \bind "C-x g"                  "buffer-view ps"
83 \bind "C-x k"                  "buffer-close"
84 \bind "C-x p"                  "buffer-view dvi"
85 \bind "C-x r"                  "buffer-update dvi"
86 # Should have been "buffer-write-some"
87 # \bind "C-x s"                  "buffer-write"
88 \bind "C-x t"                  "buffer-update dvi"
89 \bind "C-x u"                  "undo"
90 \bind "C-x v h"                "dialog-show vclog"
91 \bind "C-x v v"                "vc-check-in"
92 \bind "C-x v u"                "vc-revert"
93 \bind "C-x v c"                "vc-undo-last"
94 \bind "C-x v i"                "vc-register"
95 \bind "C-x bracketleft"        "screen-up"
96 \bind "C-x bracketright"       "screen-down"
97 \bind "C-x C-a"                "buffer-auto-save"
98 \bind "C-x C-b"                "menu-open view"
99 \bind "C-x C-c"                "lyx-quit"
100 \bind "C-x C-d"                "buffer-new"
101 \bind "C-x C-f"                "file-open"
102 \bind "C-x C-g"                "buffer-view ps"
103 \bind "C-x C-p"                "buffer-view dvi"
104 \bind "C-x C-q"                "buffer-toggle-read-only"
105 #\bind "C-x C-r"                "buffer-update dvi"
106 \bind "C-x C-s"                "buffer-write"
107 \bind "C-x C-t"                "buffer-update dvi"
108 \bind "C-Next"                 "buffer-next"
109 \bind "C-Prior"                "buffer-previous"
110 \bind "S-F7"                   "thesaurus-entry"
111 \bind "S-F8"                   "dialog-show spellchecker"
112 \bind "C-x 0"                  "view-close"
113
114 # Window commands
115 \bind "C-x 5 2"                "window-new"
116 \bind "C-x 5 0"                "window-close"
117
118
119 # this is "upcase-region" in emacs
120 #\bind "C-x C-u"                "undo"
121 \bind "C-x C-w"                "buffer-write-as"
122
123 #bind "C-1"                    "------"
124 #bind "C-2"                    "------"
125 #bind "C-3"                    "------"
126 #bind "C-4"                    "------"
127 #bind "C-5"                    "------"
128 #bind "C-6"                    "------"
129 #bind "C-7"                    "------"
130 #bind "C-8"                    "------"
131 #bind "C-9"                    "------"
132 #bind "C-0"                    "------"
133
134 #bind "F1"                     "help"                          # Not yet implemented!
135 #bind "C-F1"                   "help-context"                  # Not yet implemented!
136 #\bind "F2"                     "buffer-write"
137 #\bind "F3"                     "file-open"
138 #bind "F4"                     "------"
139 #bind "F5"                     "------"
140 #bind "F6"                     "------"
141 #bind "F7"                     "------"
142 #bind "F8"                     "------"
143 #bind "F9"                     "------"
144 #bind "F10"                    "------"
145
146 \bind "M-x"                     "command-execute"
147 \bind "C-M-o"                   "dialog-show toc"
148
149 \bind "M-equal"                 "buffer-zoom-in"
150 \bind "M-plus"                  "buffer-zoom-in"
151 \bind "M-minus"                 "buffer-zoom-out"
152
153 #
154 # Motion group
155 #
156
157 \bind "M-Up"                    "command-alternatives outline-up; paragraph-move-up; tabular-feature move-row-up"
158 \bind "M-Down"                  "command-alternatives outline-down; paragraph-move-down; tabular-feature move-row-down"
159 \bind "M-Right"                 "tabular-feature move-column-right"
160 \bind "M-Left"                  "tabular-feature move-column-left"
161 \bind "C-Right"                 "word-right"
162 \bind "C-Left"                  "word-left"
163 \bind "C-Up"                    "paragraph-up"
164 \bind "C-Down"                  "paragraph-down"
165 \bind "Home"                    "buffer-begin"
166 \bind "End"                     "buffer-end"
167 \bind "M-~S-less"               "buffer-begin"
168 \bind "M-~S-greater"            "buffer-end"
169
170 \bind "C-~S-greater"            "label-goto"
171 \bind "C-~S-less"               "bookmark-goto 0"
172 \bind "C-~S-1"                  "bookmark-goto 1"
173 \bind "C-~S-2"                  "bookmark-goto 2"
174 \bind "C-~S-3"                  "bookmark-goto 3"
175 \bind "C-~S-4"                  "bookmark-goto 4"
176 \bind "C-~S-5"                  "bookmark-goto 5"
177 \bind "C-~S-6"                  "bookmark-goto 6"
178 \bind "C-~S-7"                  "bookmark-goto 7"
179 \bind "C-~S-8"                  "bookmark-goto 8"
180 \bind "C-~S-9"                  "bookmark-goto 9"
181 \bind "C-M-~S-1"                "bookmark-save 1"
182 \bind "C-M-~S-2"                "bookmark-save 2"
183 \bind "C-M-~S-3"                "bookmark-save 3"
184 \bind "C-M-~S-4"                "bookmark-save 4"
185 \bind "C-M-~S-5"                "bookmark-save 5"
186 \bind "C-M-~S-6"                "bookmark-save 6"
187 \bind "C-M-~S-7"                "bookmark-save 7"
188 \bind "C-M-~S-8"                "bookmark-save 8"
189 \bind "C-M-~S-9"                "bookmark-save 9"
190
191 # The below are xemacs bindings
192 #\bind "Home"                   "line-begin"
193 #\bind "End"                    "line-end"
194 #\bind "C-Home"                 "buffer-begin"
195 #\bind "C-End"                  "buffer-end"
196
197
198 #
199 # Motion + select group
200 #
201
202 \bind "S-Right"                "char-right-select"
203 \bind "S-Left"                 "char-left-select"
204 \bind "S-C-F"                  "char-forward-select"
205 \bind "S-C-B"                  "char-backward-select"
206 \bind "S-Up"                   "up-select"
207 \bind "S-Down"                 "down-select"
208 \bind "S-C-Right"              "word-right-select"
209 \bind "S-C-Left"               "word-left-select"
210 \bind "S-C-A"                  "line-begin-select"
211 \bind "S-C-E"                  "line-end-select"
212 \bind "S-C-Up"                 "paragraph-up-select"
213 \bind "S-C-Down"               "paragraph-down-select"
214 \bind "S-Home"                 "buffer-begin-select"
215 \bind "S-End"                  "buffer-end-select"
216 \bind "S-Prior"                "screen-up-select"
217 \bind "S-Next"                 "screen-down-select"
218 \bind "S-C-Home"               "buffer-begin-select"
219 \bind "S-C-End"                "buffer-end-select"
220
221 #
222 # Edit group
223 #
224
225 \bind "C-Delete"                "word-delete-forward"
226 \bind "M-d"                     "word-delete-forward"
227 \bind "C-BackSpace"             "word-delete-backward"
228 \bind "M-Return"                "paragraph-break inverse"
229 \bind "C-Return"                "newline-insert newline"
230 \bind "C-S-Return"              "newline-insert linebreak"
231 \bind "M-S-Right"               "depth-increment"
232 \bind "M-S-Left"                "depth-decrement"
233 \bind "C-S-L"                   "specialchar-insert ligature-break"
234 \bind "C-space"                 "command-alternatives math-space ; space-insert protected"
235 \bind "nobreakspace"            "space-insert protected"
236 \bind "C-M-space"               "space-insert normal"
237 \bind "S-C-space"               "space-insert thin"
238 \bind "M-~S-slash"              "specialchar-insert slash"
239 \bind "C-period"                "specialchar-insert end-of-sentence"
240 \bind "M-period"                "specialchar-insert dots"
241 \bind "M-w"                     "copy"
242 \bind "Escape"                  "meta-prefix"
243 \bind "M-u"                     "word-upcase partial"
244 \bind "M-l"                     "word-lowcase partial"
245 # This conflicts with the character menu.
246 #bind "M-c"                     "word-capitalize partial"
247
248 # Numeric keypad (if Shift+KP_XXX does not switch the NumLock state)
249 \bind "S-KP_Right"              "char-right-select"
250 \bind "S-KP_Left"               "char-left-select"
251 \bind "S-KP_Up"                 "up-select"
252 \bind "S-KP_Down"               "down-select"
253 \bind "S-C-KP_Right"            "word-right-select"
254 \bind "S-C-KP_Left"             "word-left-select"
255 \bind "S-C-KP_Up"               "paragraph-up-select"
256 \bind "S-C-KP_Down"             "paragraph-down-select"
257 \bind "S-KP_Home"               "line-begin-select"
258 \bind "S-KP_End"                "line-end-select"
259 \bind "S-KP_Prior"              "screen-up-select"
260 \bind "S-KP_Next"               "screen-down-select"
261 \bind "S-C-KP_Home"             "buffer-begin-select"
262 \bind "S-C-KP_End"              "buffer-end-select"
263 \bind "S-C-KP_Prior"            "buffer-move-previous"
264 \bind "S-C-KP_Next"             "buffer-move-next"
265 \bind "C-x h"                   "command-sequence buffer-begin ; buffer-end-select"   # select all
266 \bind "M-h"                     "inset-select-all"
267 \bind "C-KP_Insert"             "copy"
268 \bind "S-KP_Insert"             "paste"
269 \bind "S-KP_Delete"             "cut"
270
271
272 # Include menu and math bindings
273
274 \bind_file menus.bind
275 \bind_file math.bind
276 \bind_file latinkeys.bind
277 \bind_file cyrkeys.bind
278 \bind_file greekkeys.bind
279
280 # the following bindings have to be adapted w.r.t. menus.bind
281 \bind "M-c Down"                "word-lowcase partial"
282 \bind "M-c Up"                  "word-upcase partial"
283 \bind "M-c Right"               "word-capitalize partial"
284