edt-user.el 6.8 KB

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