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