readme.emacs

来自「一个开放源代码的 AT&T 的 Korn Shell 的复制品, 支持大多数 k」· EMACS 代码 · 共 89 行

EMACS
89
字号
HORIZONTAL SCROLLING====================I have migrated my 3.2 ksh edit.c mods into the 3.3 kshThis file describes the mods in general and really only applies(at this stage) to emacs-mode.  I have not touched vi-mode apartfrom making it use pprompt() so that '!' is correctly expandedas in emacs-mode.I would prefer to see both vi.c and emacs.c use a common set ofprimatives in edit.c - but that looks like a lot of work.Basically my mods affect the functions that move the cursorabout and redraw the edit line.  The input buffer "buf" is pointed to by "xbuf" and its end ispointed to by "xend".  The current position in "xbuf" and end ofthe edit line are pointed to by "xcp" and "xep" respectively.I have added "xbp" which points to the start of a display windowwithin "xbuf".[A] starting positionbuf|<-------- $COLUMNS --------->||    |<---- x_displen ------->|| PS1|     +==========+==============--------+.......+     |\          \                      \       \  xbuf xbp        xcp                    xep     xend[B] scrolledbuf|           |<----- COLUMNS -------->||           |<----- x_displen ------>||      +-----------+==========+==============--------+.......+ \           \          \                      \       \  xbuf        xbp        xcp                    xep     xendIn the above -------- represents the current edit line while===== represents that portion which is visible on the screen.Note that initially xbp == xbuf and PS1 is displayed.PS1 uses some of the screen width and thus "x_displen" is lessthan $COLUMNS.Any time that "xcp" moves outside the region bounded by "xbp"and "xbp" + "x_displen", the function x_adjust() is called torelocate "xbp" appropriately and redraw the line.Excessive I/O is avoided where possible.  x_goto() for instancecalculates whether the destination is outside the visibleregion, and if so simply adjusts "xcp" and calls x_adjust()directly.  Normally though x_adjust() is called from x_putc().The above mechanism has be updated to use a function x_lastcp()that returns a pointer that accurately  reflects the lastvisible char in the edit buffer.  That is a more accurateversion of xbp + x_displen which does not account for TABS.Other changes=============I have also added some emacs mode functions.M-[0-9]	Set a numeric arg (positive only).	Used by all word related commands.M-_M-.	Retrieve word from previous command (default is last	word).  Use M-[1-9] to select word.M-uM-lM-c	UPPER,lower,Capitalize word.Commands like delete-word now push the deleted text so that itmay be yanked back into place.BUGS?=====There are bound to be some.  Please report same to me:Simon J. Gerraty	<sjg@zen.void.oz.au>

⌨️ 快捷键说明

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