]> git.lyx.org Git - lyx.git/blob - lib/bind/emacs.bind
More licencing blurbs...
[lyx.git] / lib / bind / emacs.bind
1 # file emacs.bind
2 # This file is part of LyX, the document processor.
3 # Licence details can be found in the file COPYING.
4
5 # author Lars Gullik Bjønnes
6 # author Jean-Marc Lasgouttes
7 # author Angus Leeming
8 # author John Levon
9 # author Allan Rae
10 # author Jürgen Spitzmüller
11 # author Andrew Zabolotny
12
13 # Full author contact details are available in file CREDITS.
14
15 # This is the EMACS flavour bind file, based on the bindings found 
16 # in the Emacs editor.
17 #
18 #
19 # DO NOT CHANGE THIS DEFAULT BINDING FILE! It will be replaced
20 # with every new install of LyX and your changes will be lost. 
21 # Instead, customize a copy of this file placed in 
22 # ~/.lyx/bind/emacs.bind
23 #
24 # Happy tuning!
25
26 \bind "C-~S-at"                 "mark-on"
27 \bind "C-a"                     "line-begin"
28 \bind "C-b"                     "char-backward"
29 #bind "C-c"                     "------" // used as users prefix
30 \bind "C-d"                     "delete-forward"
31 \bind "C-e"                     "line-end"
32 \bind "C-f"                     "char-forward"
33 \bind "C-g"                     "cancel"
34
35 # help in emacs
36 \bind "C-h"                    "hyphenation-point-insert" 
37 \bind "C-i"                    "hfill-insert"
38 \bind "C-j"                    "break-paragraph"
39 \bind "C-k"                    "line-delete-forward"
40 \bind "C-l"                    "screen-recenter"
41 \bind "C-m"                    "mark-toggle"
42 \bind "C-n"                    "down"
43 \bind "C-o"                    "inset-toggle"
44 \bind "C-p"                    "up"
45
46 # this is "quoted-insert" a total different meaning from "quote-insert"
47 \bind "C-q"                    "self-insert \""
48 #bind "C-r"                    "------"
49 \bind "C-s"                    "dialog-show findreplace"
50 \bind "M-~S-percent"            "dialog-show findreplace"
51
52 \bind "C-t"                    "chars-transpose"
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
60 \bind "C-w"                    "cut"
61 #bind "C-x"                    "------"
62 \bind "C-y"                    "paste"
63
64 #should be "lyx-iconify"
65 #bind "C-z"                    "------"
66
67 \bind "C-~S-slash"             "undo"
68 \bind "C-~S-underscore"        "undo"
69
70 \bind "~S-C-quotedbl"           "self-insert \""
71
72 \bind "C-x a"                  "buffer-auto-save"
73 #\bind "C-x b"                 "buffer-previous"
74 \bind "C-x d"                  "buffer-new"
75 \bind "C-x g"                  "buffer-view ps"
76 \bind "C-x k"                  "buffer-close"
77 \bind "C-x p"                  "buffer-view dvi"
78 \bind "C-x r"                  "buffer-update dvi"
79 # Should have been "buffer-write-some"
80 # \bind "C-x s"                  "buffer-write"
81 \bind "C-x t"                  "buffer-update dvi"
82 \bind "C-x u"                  "undo"
83 \bind "C-x v h"                "dialog-show vclog"
84 \bind "C-x v v"                "vc-check-in"
85 \bind "C-x v u"                "vc-revert"
86 \bind "C-x v c"                "vc-undo-last"
87 \bind "C-x v i"                "vc-register"
88 \bind "C-x bracketleft"        "screen-up"
89 \bind "C-x bracketright"       "screen-down"
90 \bind "C-x C-a"                "buffer-auto-save"
91 \bind "C-x C-b"                "menu-open documents"
92 \bind "C-x C-c"                "lyx-quit"
93 \bind "C-x C-d"                "buffer-new"
94 \bind "C-x C-f"                "file-open"
95 \bind "C-x C-g"                "buffer-view ps"
96 \bind "C-x C-p"                "buffer-view dvi"
97 \bind "C-x C-q"                "buffer-toggle-read-only"
98 #\bind "C-x C-r"                "buffer-update dvi"
99 \bind "C-x C-s"                "buffer-write"
100 \bind "C-x C-t"                "buffer-update dvi"
101
102
103 # this is "upcase-region" in emacs
104 #\bind "C-x C-u"                "undo"
105 \bind "C-x C-w"                "buffer-write-as"
106
107 #bind "C-1"                    "------"
108 #bind "C-2"                    "------"
109 #bind "C-3"                    "------"
110 #bind "C-4"                    "------"
111 #bind "C-5"                    "------"
112 #bind "C-6"                    "------"
113 #bind "C-7"                    "------"
114 #bind "C-8"                    "------"
115 #bind "C-9"                    "------"
116 #bind "C-0"                    "------"
117
118 #bind "F1"                     "help"                          # Not yet implemented!
119 #bind "C-F1"                   "help-context"                  # Not yet implemented!
120 #\bind "F2"                     "buffer-write"
121 #\bind "F3"                     "file-open"
122 #bind "F4"                     "------"
123 #bind "F5"                     "------"
124 #bind "F6"                     "------"
125 #bind "F7"                     "------"
126 #bind "F8"                     "------"
127 #bind "F9"                     "------"
128 #bind "F10"                    "------"
129
130 \bind "M-x"                     "command-execute"
131
132
133 #
134 # Motion group
135 #
136
137 \bind "C-Right"                 "word-forward"
138 \bind "C-Left"                  "word-backward"
139 \bind "C-Up"                    "paragraph-up"
140 \bind "C-Down"                  "paragraph-down"
141 \bind "Home"                    "buffer-begin"
142 \bind "End"                     "buffer-end"
143 \bind "M-~S-less"               "buffer-begin"
144 \bind "M-~S-greater"            "buffer-end"
145
146 \bind "C-~S-greater"            "reference-goto"
147 \bind "C-~S-less"               "bookmark-goto 0"
148 \bind "C-~S-1"                  "bookmark-goto 1"
149 \bind "C-~S-2"                  "bookmark-goto 2"
150 \bind "C-~S-3"                  "bookmark-goto 3"
151 \bind "C-M-~S-1"                "bookmark-save 1"
152 \bind "C-M-~S-2"                "bookmark-save 2"
153 \bind "C-M-~S-3"                "bookmark-save 3"
154
155 # The below are xemacs bindings
156 #\bind "Home"                   "line-begin"
157 #\bind "End"                    "line-end"
158 #\bind "C-Home"                 "buffer-begin"
159 #\bind "C-End"                  "buffer-end"
160
161
162 #
163 # Motion + select group
164 #
165
166 \bind "S-Right"                "forward-select"
167 \bind "S-Left"                 "backward-select"
168 \bind "S-C-F"                  "forward-select"
169 \bind "S-C-B"                  "backward-select"
170 \bind "S-Up"                   "up-select"
171 \bind "S-Down"                 "down-select"
172 \bind "S-C-Right"              "word-forward-select"
173 \bind "S-C-Left"               "word-backward-select"
174 \bind "S-C-A"                  "line-begin-select"
175 \bind "S-C-E"                  "line-end-select"
176 \bind "S-C-Up"                 "paragraph-up-select"
177 \bind "S-C-Down"               "paragraph-down-select"
178 \bind "S-Home"                 "buffer-begin-select"
179 \bind "S-End"                  "buffer-end-select"               
180 \bind "S-Prior"                "screen-up-select"
181 \bind "S-Next"                 "screen-down-select"
182 \bind "S-C-Home"               "buffer-begin-select"
183 \bind "S-C-End"                "buffer-end-select"
184
185 #
186 # Edit group
187 #
188
189 \bind "C-Delete"                "word-delete-forward"
190 \bind "M-d"                     "word-delete-forward"
191 \bind "C-BackSpace"             "word-delete-backward"
192 \bind "M-Return"                "break-paragraph-keep-layout"
193 \bind "C-Return"                "break-line"
194 \bind "C-S-L"                   "ligature-break-insert"
195 \bind "C-space"                 "space-insert protected"
196 \bind "C-M-space"                       "space-insert normal"
197 \bind "S-C-space"                       "space-insert thin"
198 \bind "C-period"                "end-of-sentence-period-insert"
199 \bind "M-period"                "dots-insert"
200 \bind "M-w"                     "copy"
201 \bind "Escape"                  "meta-prefix"
202
203 # Numeric keypad (if Shift+KP_XXX does not switch the NumLock state)
204 \bind "S-KP_Right"              "forward-select"
205 \bind "S-KP_Left"               "backward-select"
206 \bind "S-KP_Up"                 "up-select"
207 \bind "S-KP_Down"               "down-select"
208 \bind "S-C-KP_Right"            "word-forward-select"
209 \bind "S-C-KP_Left"             "word-backward-select"
210 \bind "S-C-KP_Up"               "paragraph-up-select"
211 \bind "S-C-KP_Down"             "paragraph-down-select"
212 \bind "S-KP_Home"               "line-begin-select"
213 \bind "S-KP_End"                "line-end-select"               
214 \bind "S-KP_Prior"              "screen-up-select"
215 \bind "S-KP_Next"               "screen-down-select"
216 \bind "S-C-KP_Home"             "buffer-begin-select"
217 \bind "S-C-KP_End"              "buffer-end-select"
218 \bind "S-C-KP_Prior"            "buffer-begin-select"
219 \bind "S-C-KP_Next"             "buffer-end-select"
220 \bind "C-KP_Insert"             "copy"
221 \bind "S-KP_Insert"             "paste"
222 \bind "S-KP_Delete"             "cut"
223
224
225 # Include menu and math bindings
226
227 \bind_file menus.bind
228 \bind_file math.bind
229 \bind_file latinkeys.bind
230 \bind_file cyrkeys.bind
231 \bind_file greekkeys.bind