]> git.lyx.org Git - lyx.git/blob - lib/bind/emacs.bind
- Math.lyx: - update math bold description to the new shortcuts
[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 \bind "C-~S-at"                 "mark-on"
29 \bind "C-a"                     "line-begin"
30 \bind "C-b"                     "char-backward"
31 #bind "C-c"                     "------" // used as users prefix
32 \bind "C-d"                     "char-delete-forward"
33 \bind "C-e"                     "line-end"
34 \bind "C-f"                     "char-forward"
35 \bind "C-g"                     "cancel"
36
37 # help in emacs
38 \bind "C-h"                    "specialchar-insert hyphenation"
39 \bind "C-M-minus"               "specialchar-insert nobreakdash"
40 \bind "C-i"                    "space-insert hfill"
41 \bind "C-j"                    "break-paragraph"
42 \bind "C-k"                    "line-delete-forward"
43 \bind "C-l"                    "screen-recenter"
44 \bind "C-m"                    "mark-toggle"
45 \bind "C-n"                    "down"
46 \bind "C-o"                    "next-inset-toggle"
47 \bind "C-p"                    "up"
48
49 # this is "quoted-insert" a total different meaning from "quote-insert"
50 \bind "C-q"                    "self-insert \""
51 #bind "C-r"                    "------"
52 \bind "C-s"                    "dialog-show findreplace"
53 \bind "M-~S-percent"            "dialog-show findreplace"
54
55 \bind "C-t"                    "chars-transpose"
56
57 # universal argument in emacs
58 \bind "C-u"                    "font-underline"
59
60 # better name would be "scroll-up" as in emacs
61 \bind "C-v"                    "screen-down"
62
63 \bind "C-w"                    "cut"
64 #bind "C-x"                    "------"
65 \bind "C-y"                    "paste"
66
67 #should be "lyx-iconify"
68 #bind "C-z"                    "------"
69
70 \bind "C-~S-slash"             "undo"
71 \bind "C-~S-underscore"        "undo"
72
73 \bind "~S-M-quotedbl"           "quote-insert single"
74 \bind "~S-C-quotedbl"           "self-insert \""
75
76 \bind "C-x a"                  "buffer-auto-save"
77 #\bind "C-x b"                 "buffer-previous"
78 \bind "C-x d"                  "buffer-new"
79 \bind "C-x g"                  "buffer-view ps"
80 \bind "C-x k"                  "buffer-close"
81 \bind "C-x p"                  "buffer-view dvi"
82 \bind "C-x r"                  "buffer-update dvi"
83 # Should have been "buffer-write-some"
84 # \bind "C-x s"                  "buffer-write"
85 \bind "C-x t"                  "buffer-update dvi"
86 \bind "C-x u"                  "undo"
87 \bind "C-x v h"                "dialog-show vclog"
88 \bind "C-x v v"                "vc-check-in"
89 \bind "C-x v u"                "vc-revert"
90 \bind "C-x v c"                "vc-undo-last"
91 \bind "C-x v i"                "vc-register"
92 \bind "C-x bracketleft"        "screen-up"
93 \bind "C-x bracketright"       "screen-down"
94 \bind "C-x C-a"                "buffer-auto-save"
95 \bind "C-x C-b"                "menu-open view"
96 \bind "C-x C-c"                "lyx-quit"
97 \bind "C-x C-d"                "buffer-new"
98 \bind "C-x C-f"                "file-open"
99 \bind "C-x C-g"                "buffer-view ps"
100 \bind "C-x C-p"                "buffer-view dvi"
101 \bind "C-x C-q"                "buffer-toggle-read-only"
102 #\bind "C-x C-r"                "buffer-update dvi"
103 \bind "C-x C-s"                "buffer-write"
104 \bind "C-x C-t"                "buffer-update dvi"
105 \bind "C-Next"                 "buffer-next"
106 \bind "C-Prior"                "buffer-previous"
107
108
109 # this is "upcase-region" in emacs
110 #\bind "C-x C-u"                "undo"
111 \bind "C-x C-w"                "buffer-write-as"
112
113 #bind "C-1"                    "------"
114 #bind "C-2"                    "------"
115 #bind "C-3"                    "------"
116 #bind "C-4"                    "------"
117 #bind "C-5"                    "------"
118 #bind "C-6"                    "------"
119 #bind "C-7"                    "------"
120 #bind "C-8"                    "------"
121 #bind "C-9"                    "------"
122 #bind "C-0"                    "------"
123
124 #bind "F1"                     "help"                          # Not yet implemented!
125 #bind "C-F1"                   "help-context"                  # Not yet implemented!
126 #\bind "F2"                     "buffer-write"
127 #\bind "F3"                     "file-open"
128 #bind "F4"                     "------"
129 #bind "F5"                     "------"
130 #bind "F6"                     "------"
131 #bind "F7"                     "------"
132 #bind "F8"                     "------"
133 #bind "F9"                     "------"
134 #bind "F10"                    "------"
135
136 \bind "M-x"                     "command-execute"
137
138
139 #
140 # Motion group
141 #
142
143 \bind "M-Up"                    "paragraph-move-up"
144 \bind "M-Down"                  "paragraph-move-down"
145 \bind "C-Right"                 "word-right"
146 \bind "C-Left"                  "word-left"
147 \bind "C-Up"                    "paragraph-up"
148 \bind "C-Down"                  "paragraph-down"
149 \bind "Home"                    "buffer-begin"
150 \bind "End"                     "buffer-end"
151 \bind "M-~S-less"               "buffer-begin"
152 \bind "M-~S-greater"            "buffer-end"
153
154 \bind "C-~S-greater"            "label-goto"
155 \bind "C-~S-less"               "bookmark-goto 0"
156 \bind "C-~S-1"                  "bookmark-goto 1"
157 \bind "C-~S-2"                  "bookmark-goto 2"
158 \bind "C-~S-3"                  "bookmark-goto 3"
159 \bind "C-~S-4"                  "bookmark-goto 4"
160 \bind "C-~S-5"                  "bookmark-goto 5"
161 \bind "C-~S-6"                  "bookmark-goto 6"
162 \bind "C-~S-7"                  "bookmark-goto 7"
163 \bind "C-~S-8"                  "bookmark-goto 8"
164 \bind "C-~S-9"                  "bookmark-goto 9"
165 \bind "C-M-~S-1"                "bookmark-save 1"
166 \bind "C-M-~S-2"                "bookmark-save 2"
167 \bind "C-M-~S-3"                "bookmark-save 3"
168 \bind "C-M-~S-4"                "bookmark-save 4"
169 \bind "C-M-~S-5"                "bookmark-save 5"
170 \bind "C-M-~S-6"                "bookmark-save 6"
171 \bind "C-M-~S-7"                "bookmark-save 7"
172 \bind "C-M-~S-8"                "bookmark-save 8"
173 \bind "C-M-~S-9"                "bookmark-save 9"
174
175 # The below are xemacs bindings
176 #\bind "Home"                   "line-begin"
177 #\bind "End"                    "line-end"
178 #\bind "C-Home"                 "buffer-begin"
179 #\bind "C-End"                  "buffer-end"
180
181
182 #
183 # Motion + select group
184 #
185
186 \bind "S-Right"                "char-right-select"
187 \bind "S-Left"                 "char-left-select"
188 \bind "S-C-F"                  "char-forward-select"
189 \bind "S-C-B"                  "char-backward-select"
190 \bind "S-Up"                   "up-select"
191 \bind "S-Down"                 "down-select"
192 \bind "S-C-Right"              "word-right-select"
193 \bind "S-C-Left"               "word-left-select"
194 \bind "S-C-A"                  "line-begin-select"
195 \bind "S-C-E"                  "line-end-select"
196 \bind "S-C-Up"                 "paragraph-up-select"
197 \bind "S-C-Down"               "paragraph-down-select"
198 \bind "S-Home"                 "buffer-begin-select"
199 \bind "S-End"                  "buffer-end-select"
200 \bind "S-Prior"                "screen-up-select"
201 \bind "S-Next"                 "screen-down-select"
202 \bind "S-C-Home"               "buffer-begin-select"
203 \bind "S-C-End"                "buffer-end-select"
204
205 #
206 # Edit group
207 #
208
209 \bind "C-Delete"                "word-delete-forward"
210 \bind "M-d"                     "word-delete-forward"
211 \bind "C-BackSpace"             "word-delete-backward"
212 \bind "M-Return"                "break-paragraph inverse"
213 \bind "C-Return"                "newline-insert newline"
214 \bind "C-S-Return"              "newline-insert linebreak"
215 \bind "C-S-L"                   "specialchar-insert ligature-break"
216 \bind "C-space"                 "space-insert protected"
217 \bind "C-M-space"               "space-insert normal"
218 \bind "S-C-space"               "space-insert thin"
219 \bind "C-S-slash"               "specialchar-insert slash"
220 \bind "C-period"                "specialchar-insert end-of-sentence"
221 \bind "M-period"                "specialchar-insert dots"
222 \bind "M-w"                     "copy"
223 \bind "Escape"                  "meta-prefix"
224
225 # Numeric keypad (if Shift+KP_XXX does not switch the NumLock state)
226 \bind "S-KP_Right"              "char-right-select"
227 \bind "S-KP_Left"               "char-left-select"
228 \bind "S-KP_Up"                 "up-select"
229 \bind "S-KP_Down"               "down-select"
230 \bind "S-C-KP_Right"            "word-right-select"
231 \bind "S-C-KP_Left"             "word-left-select"
232 \bind "S-C-KP_Up"               "paragraph-up-select"
233 \bind "S-C-KP_Down"             "paragraph-down-select"
234 \bind "S-KP_Home"               "line-begin-select"
235 \bind "S-KP_End"                "line-end-select"
236 \bind "S-KP_Prior"              "screen-up-select"
237 \bind "S-KP_Next"               "screen-down-select"
238 \bind "S-C-KP_Home"             "buffer-begin-select"
239 \bind "S-C-KP_End"              "buffer-end-select"
240 \bind "S-C-KP_Prior"            "buffer-begin-select"
241 \bind "S-C-KP_Next"             "buffer-end-select"
242 \bind "C-KP_Insert"             "copy"
243 \bind "S-KP_Insert"             "paste"
244 \bind "S-KP_Delete"             "cut"
245
246
247 # Include menu and math bindings
248
249 \bind_file menus.bind
250 \bind_file math.bind
251 \bind_file latinkeys.bind
252 \bind_file cyrkeys.bind
253 \bind_file greekkeys.bind