]> git.lyx.org Git - lyx.git/blob - lib/bind/emacs.bind
A slightly buggy lfun all-insets-toggle.
[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-C-quotedbl"           "quote-insert single"
73 \bind "~S-M-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 documents"
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
105
106 # this is "upcase-region" in emacs
107 #\bind "C-x C-u"                "undo"
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 "Home"                    "buffer-begin"
145 \bind "End"                     "buffer-end"
146 \bind "M-~S-less"               "buffer-begin"
147 \bind "M-~S-greater"            "buffer-end"
148
149 \bind "C-~S-greater"            "reference-goto"
150 \bind "C-~S-less"               "bookmark-goto 0"
151 \bind "C-~S-1"                  "bookmark-goto 1"
152 \bind "C-~S-2"                  "bookmark-goto 2"
153 \bind "C-~S-3"                  "bookmark-goto 3"
154 \bind "C-M-~S-1"                "bookmark-save 1"
155 \bind "C-M-~S-2"                "bookmark-save 2"
156 \bind "C-M-~S-3"                "bookmark-save 3"
157
158 # The below are xemacs bindings
159 #\bind "Home"                   "line-begin"
160 #\bind "End"                    "line-end"
161 #\bind "C-Home"                 "buffer-begin"
162 #\bind "C-End"                  "buffer-end"
163
164
165 #
166 # Motion + select group
167 #
168
169 \bind "S-Right"                "forward-select"
170 \bind "S-Left"                 "backward-select"
171 \bind "S-C-F"                  "forward-select"
172 \bind "S-C-B"                  "backward-select"
173 \bind "S-Up"                   "up-select"
174 \bind "S-Down"                 "down-select"
175 \bind "S-C-Right"              "word-forward-select"
176 \bind "S-C-Left"               "word-backward-select"
177 \bind "S-C-A"                  "line-begin-select"
178 \bind "S-C-E"                  "line-end-select"
179 \bind "S-C-Up"                 "paragraph-up-select"
180 \bind "S-C-Down"               "paragraph-down-select"
181 \bind "S-Home"                 "buffer-begin-select"
182 \bind "S-End"                  "buffer-end-select"
183 \bind "S-Prior"                "screen-up-select"
184 \bind "S-Next"                 "screen-down-select"
185 \bind "S-C-Home"               "buffer-begin-select"
186 \bind "S-C-End"                "buffer-end-select"
187
188 #
189 # Edit group
190 #
191
192 \bind "C-Delete"                "word-delete-forward"
193 \bind "M-d"                     "word-delete-forward"
194 \bind "C-BackSpace"             "word-delete-backward"
195 \bind "M-Return"                "break-paragraph-keep-layout"
196 \bind "C-Return"                "break-line"
197 \bind "C-S-L"                   "ligature-break-insert"
198 \bind "C-space"                 "space-insert protected"
199 \bind "C-M-space"                       "space-insert normal"
200 \bind "S-C-space"                       "space-insert thin"
201 \bind "C-period"                "end-of-sentence-period-insert"
202 \bind "M-period"                "dots-insert"
203 \bind "M-w"                     "copy"
204 \bind "Escape"                  "meta-prefix"
205
206 # Numeric keypad (if Shift+KP_XXX does not switch the NumLock state)
207 \bind "S-KP_Right"              "forward-select"
208 \bind "S-KP_Left"               "backward-select"
209 \bind "S-KP_Up"                 "up-select"
210 \bind "S-KP_Down"               "down-select"
211 \bind "S-C-KP_Right"            "word-forward-select"
212 \bind "S-C-KP_Left"             "word-backward-select"
213 \bind "S-C-KP_Up"               "paragraph-up-select"
214 \bind "S-C-KP_Down"             "paragraph-down-select"
215 \bind "S-KP_Home"               "line-begin-select"
216 \bind "S-KP_End"                "line-end-select"
217 \bind "S-KP_Prior"              "screen-up-select"
218 \bind "S-KP_Next"               "screen-down-select"
219 \bind "S-C-KP_Home"             "buffer-begin-select"
220 \bind "S-C-KP_End"              "buffer-end-select"
221 \bind "S-C-KP_Prior"            "buffer-begin-select"
222 \bind "S-C-KP_Next"             "buffer-end-select"
223 \bind "C-KP_Insert"             "copy"
224 \bind "S-KP_Insert"             "paste"
225 \bind "S-KP_Delete"             "cut"
226
227
228 # Include menu and math bindings
229
230 \bind_file menus.bind
231 \bind_file math.bind
232 \bind_file latinkeys.bind
233 \bind_file cyrkeys.bind
234 \bind_file greekkeys.bind