Commit | Line | Data |
---|---|---|
631d18b2 GM |
1 | ;;; edt-user.el --- Sample user customizations for Emacs EDT emulation |
2 | ||
73b0cd50 | 3 | ;; Copyright (C) 1986, 1992-1993, 2000-2011 Free Software Foundation, Inc. |
631d18b2 GM |
4 | |
5 | ;; Author: Kevin Gallagher <kgallagh@@spd.dsccc.com> | |
6 | ;; Maintainer: Kevin Gallagher <kgallagh@@spd.dsccc.com> | |
7 | ;; Keywords: emulations | |
8 | ||
9 | ;; This file is part of GNU Emacs. | |
10 | ||
11 | ;; GNU Emacs is free software: you can redistribute it and/or modify | |
12 | ;; it under the terms of the GNU General Public License as published by | |
13 | ;; the Free Software Foundation, either version 3 of the License, or | |
14 | ;; (at your option) any later version. | |
15 | ||
16 | ;; GNU Emacs is distributed in the hope that it will be useful, | |
17 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 | ;; GNU General Public License for more details. | |
20 | ||
21 | ;; You should have received a copy of the GNU General Public License | |
22 | ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | |
23 | ||
24 | ;;; Commentary: | |
25 | ||
26 | ;; This is an example of the `edt-user.el' file that you can use | |
27 | ;; to customize the Emacs EDT emulation mode. Copy this file to | |
28 | ;; somewhere in your `load-path', and edit it as desired. | |
29 | ;; See Info node `edt' for more details. | |
30 | ||
31 | ;; ==================================================================== | |
32 | ||
33 | \f | |
34 | ;;; Code: | |
35 | ||
36 | ;;;; | |
37 | ;;;; Setup user custom EDT key bindings. | |
38 | ;;;; | |
39 | ||
40 | (defun edt-setup-user-bindings () | |
41 | "Assigns user custom EDT Emulation keyboard bindings." | |
42 | ||
43 | ;; PF1 (GOLD), PF2, PF3, PF4 | |
44 | ;; | |
45 | ;; This file MUST contain a binding of PF1 to edt-user-gold-map. So | |
46 | ;; DON'T CHANGE OR DELETE THE REGULAR KEY BINDING OF PF1 BELOW! | |
47 | ;; (However, you may change the GOLD-PF1 binding, if you wish.) | |
48 | (edt-bind-function-key "PF1" 'edt-user-gold-map 'edt-mark-section-wisely) | |
49 | (edt-bind-function-key "PF2" 'query-replace 'other-window) | |
50 | (edt-bind-function-key "PF4" 'edt-delete-entire-line 'edt-undelete-line) | |
51 | ||
52 | ;; EDT Keypad Keys | |
53 | (edt-bind-function-key "KP1" 'edt-word-forward 'edt-change-case) | |
54 | (edt-bind-function-key "KP3" 'edt-word-backward 'edt-copy) | |
55 | (edt-bind-function-key "KP6" 'edt-cut-or-copy 'yank) | |
56 | (edt-bind-function-key "KP8" 'edt-scroll-window 'fill-paragraph) | |
57 | (edt-bind-function-key "KP9" 'open-line 'edt-eliminate-all-tabs) | |
58 | (edt-bind-function-key "KPP" | |
59 | 'edt-toggle-select 'edt-line-to-middle-of-window) | |
60 | (edt-bind-function-key "KPE" 'edt-change-direction 'overwrite-mode) | |
61 | ||
62 | ;; GOLD bindings for regular keys. | |
63 | (edt-bind-gold-key "a" 'edt-append) | |
64 | (edt-bind-gold-key "A" 'edt-append) | |
65 | (edt-bind-gold-key "h" 'edt-electric-user-keypad-help) | |
66 | (edt-bind-gold-key "H" 'edt-electric-user-keypad-help) | |
67 | ||
68 | ;; Control bindings for regular keys. | |
69 | ;;; Leave binding of C-c as original prefix key. | |
70 | (edt-bind-key "\C-j" 'edt-duplicate-word) | |
71 | (edt-bind-key "\C-k" 'edt-define-key) | |
72 | (edt-bind-gold-key "\C-k" 'edt-restore-key) | |
73 | (edt-bind-key "\C-l" 'edt-learn) | |
74 | ;;; Leave binding of C-m to newline. | |
75 | (edt-bind-key "\C-n" 'edt-set-screen-width-80) | |
76 | (edt-bind-key "\C-o" 'open-line) | |
77 | (edt-bind-key "\C-p" 'fill-paragraph) | |
78 | ;;; Leave binding of C-r to isearch-backward. | |
79 | ;;; Leave binding of C-s to isearch-forward. | |
80 | (edt-bind-key "\C-t" 'edt-display-the-time) | |
81 | (edt-bind-key "\C-v" 'redraw-display) | |
82 | (edt-bind-key "\C-w" 'edt-set-screen-width-132) | |
83 | ;;; Leave binding of C-x as original prefix key. | |
84 | ) | |
85 | \f | |
86 | ;;; | |
87 | ;;; LK-201 KEYBOARD USER EDT KEYPAD HELP | |
88 | ;;; | |
89 | ||
90 | (defun edt-user-keypad-help () | |
91 | " | |
92 | USER EDT Keypad Active | |
93 | ||
94 | +----------+----------+----------+----------+ | |
95 | F7: Copy Rectangle |Prev Line |Next Line |Bkwd Char |Frwd Char | | |
96 | F8: Cut Rect Overstrike | (UP) | (DOWN) | (LEFT) | (RIGHT) | | |
97 | G-F8: Paste Rect Overstrike |Window Top|Window Bot|Bkwd Sent |Frwd Sent | | |
98 | F9: Cut Rect Insert +----------+----------+----------+----------+ | |
99 | G-F9: Paste Rect Insert | |
100 | F10: Cut Rectangle | |
101 | G-F10: Paste Rectangle | |
102 | F11: ESC +----------+----------+----------+----------+ | |
103 | F12: Beginning of Line | GOLD |Query Repl| FNDNXT |Del Ent L | | |
104 | G-F12: Delete Other Windows | (PF1) | (PF2) | (PF3) | (PF4) | | |
105 | F13: Delete to Begin of Word |Mark Wisel|Other Wind| FIND | UND L | | |
106 | HELP: Keypad Help +----------+----------+----------+----------+ | |
107 | G-HELP: Emacs Help | PAGE |Scroll Win|Open Line | DEL W | | |
108 | DO: Execute extended command | (7) | (8) | (9) | (-) | | |
109 | C-a: Beginning of Line |Ex Ext Cmd|Fill Parag|Elim Tabs | UND W | | |
110 | C-b: Backward Character +----------+----------+----------+----------+ | |
111 | C-d: Delete Character | ADVANCE | BACKUP | CUT/COPY | DEL C | | |
112 | C-e: End of Line | (4) | (5) | (6) | (,) | | |
113 | C-f: Forward Character | BOTTOM | TOP | Yank | UND C | | |
114 | C-g: Keyboard Quit +----------+----------+----------+----------+ | |
115 | G-C-g: Keyboard Quit | Fwd Word | EOL | Bwd Word | Change | | |
116 | C-h: Electric Emacs Help | (1) | (2) | (3) | Direction| | |
117 | G-C-h: Emacs Help | CHNGCASE | DEL EOL | COPY | | | |
118 | C-i: Indent for Tab +---------------------+----------+ (ENTER) | | |
119 | C-j: Duplicate Word | LINE |SELECT/RES| | | |
120 | C-k: Define Key | (0) | (.) | Toggle | | |
121 | G-C-k: Restore Key | Open Line |Center Lin|Insrt/Over| | |
122 | C-l: Learn +---------------------+----------+----------+ | |
123 | C-n: Set Screen Width 80 | |
124 | C-o: Open Line +----------+----------+----------+ | |
125 | C-p: Fill Paragraph | FNDNXT | Yank | CUT | | |
126 | C-q: Quoted Insert | (FIND)) | (INSERT) | (REMOVE) | | |
127 | C-r: Isearch Backward | FIND | | COPY | | |
128 | C-s: Isearch Forward +----------+----------+----------+ | |
129 | C-t: Display the Time |SELECT/RES|SECT BACKW|SECT FORWA| | |
130 | C-u: Universal Argument | (SELECT) |(PREVIOUS)| (NEXT) | | |
131 | C-v: Redraw Display | | | | | |
132 | C-w: Set Screen Width 132 +----------+----------+----------+ | |
133 | C-z: Suspend Emacs | |
134 | G-C-\\: Split Window | |
135 | ||
136 | G-a: Append to Kill Buffer | |
137 | G-b: Buffer Menu | |
138 | G-c: Compile | |
139 | G-d: Delete Window | |
140 | G-e: Exit | |
141 | G-f: Find File | |
142 | G-g: Find File Other Window | |
143 | G-h: Keypad Help | |
144 | G-i: Insert File | |
145 | G-k: Toggle Capitalization Word | |
146 | G-l: Lowercase Word or Region | |
147 | G-m: Save Some Buffers | |
148 | G-n: Next Error | |
149 | G-o: Switch Windows | |
150 | G-q: Quit | |
151 | G-r: Revert File | |
152 | G-s: Save Buffer | |
153 | G-u: Uppercase Word or Region | |
154 | G-v: Find File Other Window | |
155 | G-w: Write file | |
156 | G-y: EDT Emulation OFF | |
157 | G-z: Switch to Default EDT Key Bindings | |
158 | G-2: Split Window | |
159 | G-%: Go to Percentage | |
160 | G- : Undo (GOLD Spacebar) | |
161 | G-=: Go to Line | |
162 | G-`: What line | |
163 | G-/: Query-Replace" | |
164 | ||
165 | (interactive) | |
166 | (describe-function 'edt-user-keypad-help)) | |
167 | ||
631d18b2 | 168 | ;;; edt-user.el ends here |