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