⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 edt-user.doc

📁 windows版本的emacs
💻 DOC
📖 第 1 页 / 共 3 页
字号:
     turning it on or off, as the case may be, then try again.  If this doesn't     solve your problem, you may have to modify the X keysym mappings with     xmodmap.     On one distribution on an Intel PC, the following .xmodmaprc set things up     nicely.           ! File:  .xmodmaprc         !         ! Set up PC keypad under GNU/Linux for the GNU Emacs EDT Emulation          !	 clear  mod2	 keycode  77 = F12	 keycode  96 = Num_Lock Pointer_EnableKeys	 add mod2 = Num_Lock     In this example, after feeding the file to the xmodmap command, the PC     NumLock keypad key will be configurable for the emulation of the PF1 key.     The PC keypad can now emulate an LK-201 keypad (less the comma key), the     standard keyboard supplied with DEC terminals VT-200 and above.  This     .xmodmaprc file switches the role of the F12 and NumLock keys.  It has     been tested on RedHat GNU/Linux 5.2.  Other versions of GNU/Linux may     require different keycodes.  (See the "General Notes on Using NumLock for     the PF1 Key on a Unix System" section below for further help on how to do     this.)     NOTE: Remember, it may be necessary to have NumLock in one position (ON)     or the other (OFF) for the PC keypad to emulate the LK-201 keypad     properly.  General Notes on Using NumLock for the PF1 Key on a Unix System:     Making the physical NumLock key available for use in the EDT     Emulation requires some modification to the default X Window     settings.  Since the keycode assignments vary from system to     system, some investigation is needed to see how to do this on     a particular system.     You will need to look at the output generated by xmodmap invoked with the     "-pm" switch.  examined.  For example, on RedHat GNU/Linux 5.2 on a PC, we     get the following output when running xmodmap.     "xmodmap -pm"  yields:          xmodmap:  up to 2 keys per modifier, (keycodes in parentheses):          shift       Shift_L (0x32),  Shift_R (0x3e)          lock        Caps_Lock (0x42)          control     Control_L (0x25),  Control_R (0x6d)          mod1        Alt_L (0x40),  Alt_R (0x71)          mod2        Num_Lock (0x4d)          mod3          mod4          mod5        Scroll_Lock (0x4e)     Note that Num_Lock is assigned to the modifier mod2.  This is     what hides Num_Lock from being seen by Emacs.     Now, "xmodmap -pke" yields:             .             .             .          keycode  77 = Num_Lock Pointer_EnableKeys             .             .             .          keycode  96 = F12             .             .             .     So, in RedHat GNU/Linux 5.2 on a PC, Num_Lock generates keycode     77.  The following steps are taken:         1.  clear the assignment of Num_Lock to mod2;         2.  swap the keycodes assigned to F12 and Num_Lock;         3.  assign Num_Lock back to mod2.     The .xmodmaprc file looks like this:         ! File:  .xmodmaprc         !         ! Set up PC keypad under GNU/Linux for the GNU Emacs EDT Emulation          !	 clear  mod2	 keycode  77 = F12	 keycode  96 = Num_Lock Pointer_EnableKeys	 add mod2 = Num_Lock     So, after executing "xmodmap .xmodmaprc", a press of the physical     F12 key looks like a Num_Lock keypress to X.  Also, a press of the     physical NumLock key looks like a press of the F12 key to X.     Now, edt-mapper.el will see "f12" when the physical NumLock key     is pressed, allowing the NumLock key to be used as the EDT PF1     (Gold) key. V.    HOW DOES THIS EDT EMULATION DIFFER FROM REAL EDT?:In general, you will find that this emulation of EDT replicates most, but notall, of EDT's most used Keypad Mode editing functions and behavior.  It is notperfect, but most EDT users who have tried the emulation agree that it isquite good enough to make it easy for die-hard EDT users to move over to usingGNU Emacs.  Here's a list of the most important differences between EDT and this GNU EmacsEDT Emulation.  The list is short but you must be aware of these differencesif you are to use the EDT Emulation effectively.1.  Entering repeat counts works a little differently than in EDT.    EDT allows users to enter a repeat count before entering a command that    accepts repeat counts.  For example, when using the real EDT, pressing    these three keys in sequence, GOLD 5 KP1, will move the cursor in the    current direction 5 words.  This does NOT work in Emacs!    Emacs provides two ways to enter repeat counts and neither involves using    the GOLD key.  First, repeat counts can be entered in Emacs by using the    ESC key.  For example, pressing these keys in sequence, ESC 1 0 KP1, will    move the cursor in the current direction 10 words.  Second, Emacs provides    another command called universal-argument that can be used to do the same    thing.  Normally, in Emacs has this bound to C-u.2.  EDT's line mode commands and nokeypad mode commands are NOT supported    (with one important exception; see item 8 in the Highlights section    below).  Although, at first, this may seem like a big omission, the set of    built-in Emacs commands provides a much richer set of capabilities which    more than make up for this omission.    To enter Emacs commands not bound to keys, you can press GOLD KP7 or the DO    key.  Emacs will display its own command prompt "M-x".  This stands for the    keypress Meta-x, where Meta is a special shift key.  The Alt key is often    mapped to behave as a Meta key.  So, you can also invoke this prompt by    pressing Meta-x.  Typing the sequence "ESC x" will also invoke the prompt.3.  Selected text is highlighted ONLY on systems where Emacs supports the    highlighting of text.4.  Just like in TPU/EVE, the ENTER key is NOT used to terminate input when the    editor prompts you for input.  The RETURN key is used, instead.  (KP4 and    KP5 (the direction keys) do terminate input for the FIND command, just like    in EDT, however.)VI.   SOME HIGHLIGHTS IN THIS EDT EMULATION, AND SOME COMPARISONS TO THE      ORIGINAL GNU EMACS EDT EMULATION:1.  The EDT define key command is supported (edt-define-key) and is bound to    C-k in the default EDT mode when EDT control sequence bindings are enabled    or one of the sample edt-user.el customization files is used.  The TPU/EVE    learn command is supported but not bound to a key in the default EDT mode    but is bound in the sample edt-user.el file.    Unlike the TPU/EVE learn command, which uses one key to begin the learn    sequence, C-l, and another command to remember the sequence, C-r, this    version of the learn command (edt-learn) serves as a toggle to both begin    and to remember the learn sequence.    Many users who change the meaning of a key with the define key and the    learn commands, would like to be able to restore the original key binding    without having to quit and restart emacs.  So a restore key command is    provided to do just that.  When invoked, it prompts you to press the key    to which you wish the last replaced key definition restored.  It is bound    to GOLD C-k in the default EDT mode when EDT control sequence bindings are    enabled or one of the sample edt-user.el customization files is used.2.  Direction support is fully supported.  3.  All original Emacs bindings are fully restored when EDT emulation is turned    off.  So, if a fellow worker comes over to your terminal to help you with a    software problem, for example, and is completely confused by your EDT    emulation bindings, just enter the command, edt-emulation-off, at the M-x    prompt and the original Emacs bindings will be restored.  To resume the EDT    emulation, just enter edt-emulation-on.4.  User custom EDT bindings are kept separate from the default EDT bindings.    One can toggle back and forth between the custom EDT bindings and default    EDT bindings.5.  The Emacs functions in edt.el attempt to emulate, where practical, the    exact behavior of the corresponding EDT keypad mode commands.  In a few    cases, the emulation is not exact, but we hope you will agree it is close    enough.  In a very few cases, we chose to use the Emacs way of handling    things.  As mentioned earlier, we do not emulate the EDT SUBS command.    Instead, we chose to use the Emacs query-replace function, which we find    to be easier to use.6.  Emacs uses the regexp assigned to page-delimiter to determine what marks a    page break.  This is normally "^\f", which causes the edt-page command to    ignore form feeds not located at the beginning of a line.  To emulate the    EDT PAGE command exactly, page-delimiter is set to "\f" when EDT emulation    is turned on, and restored to "^\f" when EDT emulation is turned off.    But, since some users prefer the Emacs definition of a page break, or may    wish to preserve a customized definition of page break, one can override    the EDT definition by placing            (setq edt-keep-current-page-delimiter t)    in your .emacs file.  Or, you can used the Emacs customize command    to change its setting.7.  The EDT definition of a section of a terminal window is hardwired to be 16    lines of its one-and-only 24-line window (the EDT SECT command bound to    KP8).  That's two-thirds of the window at a time.  Since Emacs, like    TPU/EVE, can handle multiple windows of sizes of other than 24 lines, the    definition of section used here has been modified to two-thirds of the    current window.  (There is also an edt-scroll-window function which you    may prefer over the SECT emulation.)8.  Cursor movement and deletion involving word entities is identical to EDT.    This, above all else, gives the die-hard EDT user a sense of being at    home.  Also, an emulation of EDT's SET ENTITY WORD command is provided,    for those users who like to customize movement by a word at a time to    their own liking.9.  EDT's FIND and FNDNXT are supported.10. EDT's APPEND, REPLACE, and SUBS commands are supported.11. CHNGCASE is supported.  It works on individual characters or selected    text, if SELECT is active.  In addition, two new commands are provided:    edt-lowercase and edt-uppercase.  They work on individual WORDS or    selected text, if SELECT is active.12. Form feed and tab insert commands are supported.13. A new command, edt-duplicate-word, is provided.  If you experiment with    it, you might find it to be surprisingly useful and may wonder how you    ever got along without it!  It is assigned to C-j in the sample    edt-user.el customization files.14. TPU/EVE's Rectangular Cut and Paste functions (originally from the EVE-Plus    package) are supported.  But unlike the TPU/EVE versions, these here    support both insert and overwrite modes.  The seven rectangular functions    are bound to F7, F8, GOLD-F8, F9, GOLD-F9, F10, and GOLD-F10 in the    default EDT mode.15. The original EDT emulation package set up many default regular and GOLD    bindings.  We tried to preserve most (but not all!) of these, so users of    the original emulation package will feel more at home.      Nevertheless, there are still many GOLD key sequences which are not bound    to any functions.  These are prime candidates to use for your own     customizations.          Also, there are several commands in edt.el not bound to any key.  So, you    will find it worthwhile to look through edt.el for functions you may wish    to add to your personal customized bindings.16. The VT200/VT300 series terminals steal the function keys F1 to F5 for    their own use.  These do not generate signals which are sent to the host.    So, edt.el does not assign any default bindings to F1 through F5.    In addition, our VT220 terminals generate an interrupt when the F6 key is    pressed (^C or ^Y, can't remember which) and not the character sequence    documented in the manual.  So, binding emacs commands to F6 will not work    if your terminal behaves the same way.17. The VT220 terminal has no ESC, BS, nor LF keys, as does a VT100.  So the    default EDT bindings adopt the standard DEC convention of having the F11,    F12, and F13 keys, on a VT200 series (and above) terminal, assigned to the    same EDT functions that are bound to ESC, BS, and LF on a VT100 terminal.18. Each user, through the use of a private edt-user.el file, can customize,    very easily, personal EDT emulation bindings.19. The EDT SELECT and RESET functions are supported.  However, unlike EDT,    pressing RESET to cancel text selection does NOT reset the existing    setting of the current direction.    We also provide a TPU/EVE like version of the single SELECT/RESET    function, called edt-toggle-select, which makes the EDT SELECT function    into a toggle on/off switch.  That is, if selection is ON, pressing SELECT    again turns selection off (cancels selection).  This function is used in    the sample edt-user.el customization files.20. EDT scroll margins are supported, but are disabled by default.  (See    CUSTOMIZING section below for instructions on how to enable them.)VII.  CUSTOMIZING:Most EDT users, at one time or another, make some custom key bindings, oruse someone else's custom key bindings, which they come to depend upon just asif they were built-in bindings.  This EDT Emulation for GNU Emacs is designedto make it easy to customize bindings.If you wish to customize the EDT Emulation to use some of your own keybindings, you need to make a private version of edt-user.el in your ownprivate lisp directory.  There are two sample files edt-user.el1 andedt-user.el2 for you to use as templates and for ideas.  Look atedt-user.el1 first.  Unless you will be using two or more very differenttypes of terminals on the same system, you need not look at edt-user.el2.First, you need to have your own private lisp directory, say ~/lisp, andyou should add it to the GNU Emacs load path.NOTE:  A few sites have different load-path requirements, so the above       directions may need some modification if your site has such special       needs. Creating your own edt-user.el file:A sample edt-user.el file is attached to the end of this user documentation.You should use it as a guide to learn how you can customize EDT emulationbindings to your own liking.  Names used to identify the set of LK-201keypad and function keys are:Keypad Keys:                   PF1 PF2 PF3 PF4                KP7 KP8 KP9 KP-                KP4 KP5 KP6 KP,                KP1 KP2 KP3                 KP0     KPP KPEArrow Keys:                LEFT RIGHT DOWN UPFunction Keys:                F1 F2 F3 F4 F5  F6 F7 F8 F9 F10  F11 F12 F13 F14                HELP DO  F17 F18 F19 F20                FIND   INSERT   REMOVE                 SELECT PREVIOUS NEXT

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -