(command.CommandList children: [ (C {<echo>} {<x>} {<->} {<cflags.ms>}) (command.Simple words: [{<sed>} {(SQ <'/^X/s///'>)}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<cflags.ms>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {(SQ <'/'>)} here_end_span_id: 304 stdin_parts: [ <'X.Go 9 "CFLAGS"\n'> <'X.PP\n'> <'X\\*E uses many preprocessor symbols to control compilation.\n'> <'XSome of these control the sizes of buffers and such.\n'> <'XThe "-DNO_XXXX" options remove small sets of related features.\n'> <'X.PP\n'> <'XMost \\*E users will probably want to keep all features available.\n'> <'XMinix-PC users, though, will have to sacrifice some sets because otherwise\n'> <'X\\*E would be too bulky to compile.\n'> <'XThe "asld" phase of the compiler craps out.\n'> <'X.IP "-DM_SYSV, -Dbsd, -DTOS, -DCOHERENT, -Damiga"\n'> <'XThese flags tell the compiler that \\*E is being compiled for\n'> <'XSystem-V UNIX, BSD UNIX, Atari TOS, Coherent, or AmigaDos, respectively.\n'> < 'XFor other systems, the config.h file can generally figure it out automatically.\n' > <'X.IP -DRAINBOW\n'> <'XFor MS-DOS systems, this causes support for the DEC Rainbow to be compiled\n'> <'Xinto \\*E.\n'> <'X.IP -DS5WINSIZE\n'> <'XSome versions of SysV UNIX don\'t support support the "winsize"\n'> <'Xstyle of screen-size testing,\n'> <'Xso elvis ignores window size changes by default.\n'> <'X.IP\n'> <'XHowever, many of the newer SysV systems defines "winsize" in the\n'> <'Xfile "/usr/include/sys/ptem.h".\n'> <'XIf your SysV system has "winsize" then you should add\n'> <'X-DS5SWINSIZE to the CFLAGS setting.\n'> <'X.IP -DTERMIOS\n'> <'XPOSIX is a SysV-derived specification which uses a terminal control\n'> <'Xpackage called "termios", instead of "termio".\n'> <'XSome other SysV systems may also use termios.\n'> <'XYou can make elvis uses termios instead of the more common termio\n'> <'Xby adding -DTERMIOS to CFLAGS.\n'> <'X(Note: This hasn\'t been tested very well.)\n'> <'X.IP -DNBUFS=\\fInumber\\fP\n'> <'X\\*E keeps most of your text in a temporary file;\n'> <'Xonly a small amount is actually stored in RAM.\n'> < 'XThis flag allows you to control how much of the file can be in RAM at any time.\n' > <'XThe default is 5 blocks, and the minimum is 3 blocks.\n'> <'X(See the -DBLKSIZE flag, below.)\n'> <'X.IP\n'> <'XMore RAM allows global changes to happen a little faster.\n'> <'X f you\'re just making many small changes in one section of a file, though,\n'> <'Xextra RAM won\'t help much.\n'> <'X.IP -DBLKSIZE=\\fInumber\\fP\n'> <'XThis controls the size of blocks that \\*E uses internally.\n'> <'XThe value of BLKSIZE must be a power of two.\n'> <'XEvery time you double BLKSIZE, you quadruple the size of a text file that\n'> <'X\\*E can handle, but you also cause the temporary file to grow faster.\n'> <'XFor MS-DOS, Coherent, and Minix-PC, the default value is 1024, which allows\n'> <'Xyou to edit files up to almost 512K bytes long.\n'> <'XFor all other systems, the default value is 2048, which allows you to edit\n'> <'Xfiles that are nearly 2 megabytes long.\n'> <'X.IP\n'> <'XThe BLKSIZE also determines the maximum line length, and a few other limits.\n'> <'XBLKSIZE should be either 256, 512, 1024, or 2048.\n'> <'XValues other than these can lead to strange behaviour.\n'> <'X.IP -DTMPDIR=\\fIstring\\fP\n'> <'XThis sets the default value of the "directory" option, which specifies where\n'> <'Xthe temporary files should reside.\n'> <'XThe value of TMPDIR must be a string, so be sure your value includes the\n'> <'Xquote characters on each end.\n'> < 'X.IP "-DEXRC=\\fIstr\\fP, -DHMEXRC=\\fIstr\\fP, -DSYSEXRC=\\fIstr\\fP, -DEXINIT=\\fIstr\\fP"\n' > <'XThis lets you control the names of the initialization files.\n'> <'XTheir values must be strings, so be careful about quoting.\n'> <'X.IP\n'> <'XEXRC is the name of the initialization file in the current directory.\n'> <'XIts default value is ".exrc" on UNIX systems -- the same as the real vi.\n'> <'XSince that isn\'t a legal DOS filename, under DOS the default is "elvis.rc".\n'> <'XFor other systems, check the config.h file.\n'> <'X.IP\n'> <'XHMEXRC is the name of the initialization file in your home directory.\n'> <'XBy default, it is the same as EXRC.\n'> <'X\\*E will automatically prepend the name of your home directory to HMEXRC\n'> <'Xat run time, so don\'t give a full path name.\n'> <'X.IP\n'> <'XSYSEXRC is the name of a system-wide initialization file.\n'> <'XIt has no default value;\n'> <'Xif you don\'t define a value for it, then\n'> <'Xthe code that supports SYSEXRC just isn\'t compiled.\n'> <'XThe value of SYSEXRC should be a full pathname, in quotes.\n'> <'X.IP\n'> <'XEXINIT is the name of an environment variable that can contain initialization\n'> <'Xcommands.\n'> <'XNormally, its value is "EXINIT".\n'> <'X.IP -DKEYWORDPRG=\\fIstring\\fP\n'> <'XThis flag determines the default value of the "keywordprg" option.\n'> <'XIts value must be a string, so be careful about quoting.\n'> <'XThe default value of this flag is "ref", which is a C reference program.\n'> < 'X.IP "-DCC_COMMAND=\\fIstring\\fP -DMAKE_COMMAND=\\fIstring\\fP -DERRLIST=\\fIstring\\fP"\n' > <'XThese control the names of the C compiler, the "make" utility, and the\n'> <'Xerror output file, respectively.\n'> <'XThey are only used if -DNO_ERRLIST is not given.\n'> <'X.IP\n'> <'XThe default value of CC_COMMAND depends on the Operating System and compiler\n'> <'Xthat you use to compile elvis;\n'> <'Xfor UNIX, the default is "cc".\n'> <'XThe default values of MAKE_COMMAND and ERRLIST are "make" and "errlist",\n'> <'Xrespectively.\n'> <'X.IP -DMAXRCLEN=\\fInumber\\fP\n'> <'XThis determines how large a :@ macro command can be (measured in bytes).\n'> <'XThe default is 1000 bytes.\n'> <'XIf you increase this value significantly,\n'> <'Xthen you may need to allocate extra memory for the stack.\n'> <'XSee the "CHMEM" setting in the Makefile.\n'> <'X.IP -DSHELL=\\fIstring\\fP\n'> <'XThis is the default value of the "shell" option, and hence\n'> <'Xthe default shell used from within \\*E.\n'> <'XThis only controls the default;\n'> <'Xthe value you give here may be overridden at run-time by setting\n'> <'Xan environment variable named SHELL (or COMSPEC for MS-DOS).\n'> <'XIts value must be a string constant, so be careful about quoting.\n'> <'X.IP -DTAGS=\\fIstring\\fP\n'> <'XThis sets the name of the "tags" file,\n'> <'Xwhich is used by the :tag command.\n'> <'XIts value must be a string constant, so be careful about quoting.\n'> <'X.IP "-DCS_IBMPC -DCS_LATIN1 -DCS_SPECIAL"\n'> <'XThe digraph table and flipcase option will normally start out empty.\n'> <'XHowever, if you add -DCS_IBMPC or -DCS_LATIN1 to your CFLAGS,\n'> <'Xthen they will start out filled with values that are appropriate for the\n'> <'XIBM PC character set or the ISO Latin-1 character set, respectively.\n'> <'X.IP\n'> <'XYou can also use -DCS_IBMPC and -DCS_SPECIAL together to get digraphs\n'> <'Xthat produce the PC\'s graphic characters.\n'> <'X.IP "-DDEBUG -DEBUG2"\n'> <'X-DDEBUG adds the ":debug" and ":validate" commands,\n'> <'Xand also adds many internal consistency checks.\n'> <'XIt increases the size of the ".text" segment by about 6K.\n'> <'X.IP\n'> <'X-DDEBUG2 causes a line to be appended to a file called "debug.out"\n'> <'Xeverytime any change is made to the edit buffer.\n'> <'X.IP -DCRUNCH\n'> <'XThis flag removes some non-critical code, so that \\*E is smaller.\n'> <'XFor example, it removes a short-cut from the regexp package, so that\n'> <'Xtext searches are slower.\n'> <'XAlso, screen updates are not as efficient.\n'> <'XA couple of obscure features are disabled by this, too.\n'> <'X.IP -DNO_MKEXRC\n'> <'XThis removes the ":mkexrc" command,\n'> <'Xso you have to create any .exrc files manually.\n'> <'XThe size of the .text segment will be reduced by about 600 bytes.\n'> <'X.IP -DNO_CHARATTR\n'> <'XPermanently disables the charattr option.\n'> <'XThis reduces the size of your ".text" segment by about 850 bytes.\n'> <'X.IP -DNO_RECYCLE\n'> <'XNormally, \\*E will recycle space (from the temporary file) which contains\n'> <'Xtotally obsolete text.\n'> <'XThis flag disables this recycling.\n'> <'XWithout recycling, the ".text" segment is about 1K smaller\n'> <'Xthan it would otherwise be,\n'> <'Xbut the tmp file grows much faster.\n'> <'XIf you have a lot of free space on your hard disk,\n'> <'Xbut \\*E is too bulky to run with recycling,\n'> <'Xthen try it without recycling.\n'> <'X.IP\n'> <'XWhen using a version of \\*E that has been compiled with -DNO_RECYCLE,\n'> <'Xyou should be careful to avoid making many small changes to a file\n'> < 'Xbecause each individual change will cause the tmp file to grow by at least 1k.\n' > <'XHitting "x" thirty times counts as thirty changes,\n'> <'Xbut typing "30x" counts as one change.\n'> <'XAlso, you should occasionally do a ":w" followed by a ":e" to start with a\n'> <'Xfresh tmp file.\n'> <'X.IP\n'> <'XInterestingly, the real vi never recycles space from its temporary file.\n'> <'X.IP -DNO_SENTENCE\n'> <'XLeaves out the "(" and ")" visual mode commands.\n'> <'XAlso, the "[[", "]]", "{", and "}" commands will not recognize *roff macros.\n'> <'XThe sections and paragraphs options go away.\n'> <'XThis saves about 650 bytes in the ".text" segment.\n'> <'X.IP -DNO_CHARSEARCH\n'> <'XLeaves out the visual commands which locate a given character\n'> <'Xin the current line:\n'> <'X"f", "t", "F", "T", "," and ";".\n'> <'XThis saves about 900 bytes.\n'> <'X.IP -DNO_EXTENSIONS\n'> <'XLeaves out the "K" and "#" visual commands.\n'> <'XAlso, the arrow keys will no longer work in input mode.\n'> <'XRegular expressions will no longer recognize the \\\\{\\\\} operator.\n'> <'X(Other extensions are either inherent in the design of \\*E,\n'> <'Xor are controlled by more specific flags,\n'> <'Xor are too tiny to be worth removing.)\n'> <'XThis saves about 250 bytes.\n'> <'X.IP -DNO_MAGIC\n'> <'XPermanently disables the "magic" option, so that most meta-characters\n'> <'Xin a regular expression are *NOT* recognized.\n'> <'XThis saves about 3k of space in the ".text" segment, because\n'> <'Xthe complex regular expression code can be replaced by much simpler code.\n'> <'X.IP -DNO_SHOWMODE\n'> <'XPermanently disables the "showmode" option, saving about 250 bytes.\n'> <'X.IP -DNO_CURSORSHAPE\n'> <'XNormally, \\*E tries to adjust the shape of the cursor as a reminder\n'> <'Xof which mode you\'re in.\n'> <'XThe -DNO_CURSORSHAPE flag disables this, saving about 150 bytes.\n'> <'X.IP -DNO_DIGRAPH\n'> <'XTo allow entry of non-ASCII characters, \\*E supports digraphs.\n'> <'XA digraph is a single (non-ASCII) character which is entered as a\n'> <'Xcombination of two other (ASCII) characters.\n'> <'XIf you don\'t need to input non-ASCII characters,\n'> <'Xor if your keyboard supports a better way of entering non-ASCII characters,\n'> <'Xthen you can disable the digraph code and save about 450 bytes.\n'> <'X.IP -DNO_ERRLIST\n'> <'X\\*E adds a ":errlist" command, which is useful to programmers.\n'> < 'XIf you don\'t need this feature, you can disable it via the -DNO_ERRLIST flag.\n' > <'XThis will reduce the .text segment by about 900 bytes, and the .bss segment\n'> <'Xby about 300 bytes.\n'> <'X.IP -DNO_ABBR\n'> <'XThe -DNO_ABBR flag disables the ":abbr" command,\n'> <'Xand reduces the size of \\*E by about 250 bytes.\n'> <'X.IP -DNO_OPTCOLS\n'> <'XWhen \\*E displays the current options settings via the ":set" command,\n'> <'Xthe options are normally sorted into columns.\n'> <'XThe -DNO_OPTCOLS flag causes the options to be sorted across the rows,\n'> <'Xwhich is much simpler for the computer.\n'> <'XThe -DNO_OPTCOLS flag will reduce the size of your .text segment by about\n'> <'X500 bytes.\n'> <'X.IP -DNO_MODELINES\n'> <'XThis removes all support for modelines.\n'> <'X.IP -DNO_TAG\n'> <'XThis disables tag lookup.\n'> <'XIt reduces the size of the .text segment by about 750 bytes.\n'> <'X.IP "-DNO_ALT_FKEY -DNO_CTRL_FKEY -DNO_SHIFT_FKEY -DNO_FKEY"\n'> <'XThese remove explicit support of function keys.\n'> <'X-DNO_ALT_FKEY removes support for the <alternate> versions function keys.\n'> < 'X-DNO_CTRL_FKEY removes support for the <control> and <alternate> versions function keys.\n' > < 'X-DNO_SHIFT_FKEY removes support for the <shift>, <control>, and <alternate> versions function keys.\n' > <'X-DNO_FKEY removes all support of function keys.\n'> <'X.IP\n'> <'X\\*E\'s ":map" command normally allows you to use the special sequence "#<n>"\n'> <'Xto map function key <n>.\n'> < 'XFor example, ":map #1 {!}fmt^M" will cause the <F1> key to reformat a paragraph.\n' > <'X\\*E checks the :k1=: field in the termcap description of your terminal\n'> <'Xto figure out what code is sent by the <F1> key.\n'> < 'XThis is handy because it allows you to create a .exrc file which maps function\n' > <'Xkeys the same way regardless of what type of terminal you use.\n'> <'X.IP\n'> < 'XThat behaviour is standard; most implementations of the real vi supports it too.\n' > <'X\\*E extends this to allow you to use "#1s" to refer to <shift>+<F1>,\n'> <'X"#1c" to refer to <control>+<F1>, and\n'> <'X"#1a" to refer to <alt>+<F1>.\n'> <'XThe termcap description for the terminal should have fields named\n'> < 'X:s1=:c1=:a1=: respectively, to define the code sent by these key conbinations.\n' > <'X(You should also have :k2=:s2=:c2=:a2=: for the <F2> key, and so on.)\n'> <'X.IP\n'> <'XBut there may be problems.\n'> <'XThe terminfo database doesn\'t support :s1=:c1=:a1=:, so no terminfo terminal\n'> <'Xdescription could ever support shift/control/alt function keys;\n'> <'Xso you might as well add -DNO_SHIFT_FKEY to CFLAGS if you\'re using terminfo.\n'> <'X.IP\n'> <'XNote that, even if you have -DNO_FKEYS, you can still configure \\*E to use\n'> <'Xyour function keys my mapping the literal character codes sent by the key.\n'> <'XYou just couldn\'t do it in a terminal-independent way.\n'> <'XTERM_925\n'> <'X.IP "-DTERM_AMIGA -DTERM_VT100 -DTERM_VT52 etc."\n'> <'XThe tinytcap.c file contains descriptions of several terminal types.\n'> <'XFor each system that uses tinytcap, a reasonable subset of the available\n'> <'Xdescriptions is actually compiled into \\*E.\n'> < 'XIf you wish to enlarge this subset, then you can add the appropriate -DTERM_XXX\n' > <'Xflag to your CFLAGS settings.\n'> <'X.IP\n'> <'XFor a list of the available terminal types, check the tinytcap.c file.\n'> <'X.IP -DINTERNAL_TAGS\n'> <'XNormally, \\*E uses the "ref" program to perform tag lookup.\n'> <'XThis is more powerful than the real vi\'s tag lookup,\n'> <'Xbut it can be much slower.\n'> <'X.IP\n'> <'XIf you add -DINTERNAL_TAGS to your CFLAGS setting,\n'> <'Xthen \\* will use its own internal tag lookup code, which is faster.\n'> <'X.IP -DPRSVDIR=\\fIdirectory\\fR\n'> <'XThis controls where preserved files will be placed.\n'> <'XAn appropriate default has been chosen for each Operating System,\n'> <'Xso you probably don\'t need to worry about it.\n'> <'X.IP -DFILEPERMS=\\fInumber\\fR\n'> <'XThis affects the attributes of files that are created by \\*E;\n'> <'Xit is used as the second argument to the creat() function.\n'> <'XThe default is 0666 which (on UNIX systems at least) means that\n'> <'Xanybody can read or write the new file, but nobody can execute it.\n'> <'XOn UNIX systems, the creat() call modifies this via the umask setting.\n'> <'X.IP -DKEYBUFSIZE=\\fInumber\\fR\n'> <'XThis determines the size of the type-ahead buffer that elvis uses.\n'> <'XIt also limits the size of keymaps that it can handle.\n'> <'XThe default is 1000 characters, which should be plenty.\n'> ] ) ) ] do_fork: T ) (C {<echo>} {<x>} {<->} {<cutbufs.ms>}) (command.Simple words: [{<sed>} {(SQ <'/^X/s///'>)}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<cutbufs.ms>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {(SQ <'/'>)} here_end_span_id: 459 stdin_parts: [ <'X.Go 6 "CUT BUFFERS"\n'> <'X.PP\n'> <'XWhen \\*E deletes text, it stores that text in a cut buffer.\n'> <'XThis happens in both visual mode and EX mode.\n'> <'XThere is no practical limit to how much text a cut buffer can hold.\n'> <'X.PP\n'> <'XThere are 36 cut buffers:\n'> <'X26 named buffers ("a through "z),\n'> <'X9 anonymous buffers ("1 through "9),\n'> <'Xand 1 extra cut buffer (".).\n'> <'X.PP\n'> <'XIn EX mode, the :move and :copy commands use a cut buffer to temporarily\n'> <'Xhold the text to be moved/copied.\n'> <'X.NH 2\n'> <'XPutting text into a Cut Buffer\n'> <'X.PP\n'> <'XIn visual mode, text is copied into a cut buffer when you use the\n'> <'Xd, y, c, C, s, or x commands.\n'> <'XThere are also a few others.\n'> <'X.PP\n'> <'XBy default, the text goes into the "1 buffer.\n'> <'XThe text that used to be in "1 gets shifted into "2,\n'> <'X"2 gets shifted into "3, and so on.\n'> <'XThe text that used to be in "9 is lost.\n'> <'XThis way, the last 9 things you deleted are still accessible.\n'> <'X.PP\n'> <'XYou can also put the text into a named buffer -- "a through "z.\n'> <'XTo do this, you should type the buffer\'s name\n'> <'X(two keystrokes: a double-quote and a lowercase letter)\n'> <'Xbefore the command that will cut the text.\n'> <'XWhen you do this, "1 through "9 are not affected by the cut.\n'> <'X.PP\n'> <'XYou can append text to one of the named buffers.\n'> <'XTo do this, type the buffer\'s name in uppercase\n'> <'X(a double-quote and an uppercase letter)\n'> <'Xbefore the d/y/c/C/s/x command.\n'> <'X.PP\n'> <'XThe ". buffer is special.\n'> <'XIt isn\'t affected by the d/y/c/C/s/x command.\n'> <'XInstead, it stores the text that you typed in\n'> <'Xthe last time you were in input mode.\n'> <'XIt is used to implement the . visual command,\n'> <'Xand ^A in input mode.\n'> <'X.PP\n'> <'XIn EX mode (also known as colon mode),\n'> <'Xthe :delete, :change, and :yank commands all copy text into a cut buffer.\n'> <'XLike the visual commands, these EX commands normally use the "1 buffer,\n'> < 'Xbut you can use one of the named buffers by giving its name after the command.\n' > <'XFor example,\n'> <'X.sp 1\n'> <'X.ti +0.5i\n'> <'X:20,30y a\n'> <'X.sp\n'> <'X.LP\n'> <'Xwill copy lines 20 through 30 into cut buffer "a.\n'> <'X.PP\n'> < 'XYou can\'t directly put text into the ". buffer, or the "2 through "9 buffers.\n' > <'X.NH 2\n'> <'XPasting from a Cut Buffer\n'> <'X.PP\n'> <'XThere are two styles of pasting:\n'> <'Xline-mode and character-mode.\n'> <'XIf a cut buffer contains whole lines (from a command like "dd")\n'> <'Xthen line-mode pasting is used;\n'> <'Xif it contains partial lines (from a command like "dw")\n'> <'Xthen character-mode pasting is used.\n'> <'XThe EX commands always cut whole lines.\n'> <'X.PP\n'> <'XCharacter-mode pasting causes the text to be inserted into the line that\n'> <'Xthe cursor is on.\n'> <'X.PP\n'> <'XLine-mode pasting inserts the text on a new line above or below the line\n'> <'Xthat the cursor is on.\n'> <'XIt doesn\'t affect the cursor\'s line at all.\n'> <'X.PP\n'> <'XIn visual mode, the p and P commands insert text from a cut buffer.\n'> <'XUppercase P will insert it before the cursor,\n'> <'Xand lowercase p will insert it after the cursor.\n'> <'XNormally, these commands will paste from the "1 buffer, but you can\n'> <'Xspecify any other buffer to paste from.\n'> <'XJust type its name (a double-quote and another character)\n'> <'Xbefore you type the P or p.\n'> <'X.PP\n'> <'XIn EX mode, the (pu)t command pastes text after a given line.\n'> <'XTo paste from a buffer other that "1,\n'> <'Xenter its name after the command.\n'> <'X.NH 2\n'> <'XMacros\n'> <'X.PP\n'> <'XThe contents of a named cut buffer can be executed as a series of\n'> <'Xex/vi commands.\n'> <'X.PP\n'> <'XTo put the instructions into the cut buffer, you must first insert\n'> <'Xthem into the file, and then delete them into a named cut buffer.\n'> <'X.PP\n'> <'XTo execute a cut buffer\'s contents as EX commands,\n'> <'Xyou should give the EX command "@" and the name of the buffer.\n'> <'XFor example, :@z will execute "z as a series of EX commands.\n'> <'X.PP\n'> <'XTo execute a cut buffer\'s contents as visual commands,\n'> <'Xyou should give the visual command "@" and the letter of the buffer\'s name.\n'> <'XThe visual "@" command is different from the EX "@" command.\n'> <'XThey interpret the cut buffer\'s contents differently.\n'> <'X.PP\n'> <'XThe visual @ command can be rather finicky.\n'> <'XEach character in the buffer is interpretted as a keystroke.\n'> <'XIf you load the instructions into the cut buffer via a "zdd command,\n'> <'Xthen the newline character at the end of the line will be executed just\n'> <'Xlike any other character, so the cursor would be moved down 1 line.\n'> <'XIf you don\'t want the cursor to move down 1 line at the end of each\n'> <'X@z command, then you should load the cut buffer by saying 0"zD instead.\n'> <'X.PP\n'> <'XAlthough cut buffers can hold any amount of text,\n'> <'X\\*E can only \\fIexecute\\fR small buffers.\n'> <'XThe size limit is roughly 1000 characters, for either EX macros or VI macros.\n'> <'XIf a buffer is too large to execute, an error message is displayed.\n'> <'X.PP\n'> <'XYou can\'t nest :@ commands.\n'> <'XYou can\'t run :@ commands from your .exrc file,\n'> <'Xor any other :source file either.\n'> <'XSimilarly, you can\'t run a :source command from within an @ command.\n'> <'XHopefully, these restrictions will be lifted in a later version.\n'> <'X.NH 2\n'> <'XThe Effect of Switching Files\n'> <'X.PP\n'> <'XWhen \\*E first starts up, all cut buffers are empty.\n'> <'XWhen you switch to a different file\n'> <'X(via the :n or :e commands perhaps)\n'> <'Xthe 9 anonymous cut buffers are emptied again,\n'> <'Xbut the other 27 buffers ("a through "z, and ".) retain their text.\n'> ] ) ) ] do_fork: T ) (C {<echo>} {<x>} {<->} {<differ.ms>}) (command.Simple words: [{<sed>} {(SQ <'/^X/s///'>)}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<differ.ms>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {(SQ <'/'>)} here_end_span_id: 650 stdin_parts: [ <'X.Go 7 "DIFFERENCES BETWEEN \\*E & BSD VI/EX"\n'> <'X.PP\n'> <'X\\*E is not 100% compatible with the real vi/ex.\n'> <'X\\*E has many small extensions, some omissions, and a few features which\n'> <'Xare implemented in a slightly different manner.\n'> <'X.NH 2\n'> <'XExtensions\n'> <'X.IP "Save Configuration" 1i\n'> <'XThe :mkexrc command saves the current :set and :map configurations in\n'> <'Xthe ".exrc" file in your current directory.\n'> <'X.IP "Previous File" 1i\n'> <'XThe :N or :prev command moves backwards through the args list.\n'> <'X.IP "Center Current Row" 1i\n'> <'XIn visual command mode, the (lowercase) "zz" command will center the current\n'> <'Xline on the screen, like "z=".\n'> <'X.IP "Changing Repeat Count" 1i\n'> <'XThe default count value for . is the same as the previous command\n'> <'Xwhich . is meant to repeat.\n'> <'XHowever, you can supply a new count if you wish.\n'> <'XFor example, after "3dw", "." will delete 3 words,\n'> <'Xbut "5." will delete 5 words.\n'> <'X.IP "Previous Text" 1i\n'> <'XThe text which was most recently input\n'> <'X(via a "cw" command, or something similar)\n'> <'Xis saved in a cut buffer called ". (which\n'> <'Xis a pretty hard name to write in an English sentence).\n'> <'X.IP "Keyword Lookup" 1i\n'> <'XIn visual command mode, you can move the cursor onto a word and press\n'> <'Xshift-K to have \\*E run a reference program to look that word up.\n'> <'XThis command alone is worth the price of admission!\n'> <'XSee the ctags and ref programs.\n'> <'X.IP "Increment/Decrement" 1i\n'> <'XIn visual command mode, you can move the cursor onto a number and\n'> <'Xthen hit ## or #+ to increment that number by 1.\n'> <'XTo increment it by a larger amount,\n'> <'Xtype in the increment value before hitting the initial #.\n'> <'XThe number can also be decremented or set by hitting #- or #=, respectively.\n'> <'X.IP "Input Mode" 1i\n'> <'XYou can backspace past the beginning of the line.\n'> <'X.IP "" 1i\n'> <'XThe arrow keys work in input mode.\n'> <'X.IP "" 1i\n'> <'XIf you type control-A, then the text that you input last time is inserted.\n'> <'XYou will remain in input mode, so you can backspace over part of it,\n'> <'Xor add more to it.\n'> <'X(This is sort of like control-@ on the real vi,\n'> <'Xexcept that control-A really works.)\n'> <'X.IP "" 1i\n'> <'XControl-P will insert the contents of the cut buffer.\n'> <'X.IP "" 1i\n'> <'XReal vi can only remember up to 128 characters of input,\n'> <'Xbut \\*E can remember any amount.\n'> <'X.IP "" 1i\n'> <'XThe ^T and ^D keys can adjust the indent of a line no matter where\n'> <'Xthe cursor happens to be in that line.\n'> <'X.IP "" 1i\n'> <'XYou can save your file and exit \\*E directly from input mode by hitting\n'> <'Xcontrol-Z twice.\n'> <'X.IP "" 1i\n'> <'X\\*E supports digraphs as a way to enter non-ASCII characters.\n'> <'X.IP "Start in Input Mode" 1i\n'> <'XIf you ":set inputmode" in your .exrc file, then \\*E will start up in\n'> <'Xinput mode instead of visual command mode.\n'> <'X.IP "Visible Fonts" 1i\n'> < 'XWith ":set charattr", \\*E can display "backslash-f" style character attributes on the\n' > <'Xscreen as you edit.\n'> <'XThe following example shows the recognized atributes:\n'> <'X.sp\n'> <'X.ti +0.5i\n'> <'Xnormal \\\\fBboldface\\\\fR \\\\fIitalics\\\\fR \\\\fUunderlined\\\\fR normal\n'> <'X.sp\n'> <'XNOTE: you must compile \\*E without the -DNO_CHARATTR flag for\n'> <'Xthis to work.\n'> <'X.IP "File Syncing" 1i\n'> <'XAfter a crash, you can usually recover the altered form of the file\n'> <'Xfrom the temporary file that \\*E uses -- unless the temporary file was\n'> <'Xcorrupted.\n'> <'X.IP "" 1i\n'> <'XUNIX systems use a delayed-write cache, which means that when \\*E tries to\n'> <'Xwrite to the temporary file, the information might still be in RAM instead\n'> <'Xof on the disk.\n'> <'XA power failure at that time would cause the in-RAM information to be lost.\n'> <'XUNIX\'s sync() call will force all such information to disk.\n'> <'X.IP "" 1i\n'> <'XMS-DOS and Atari TOS don\'t write a file\'s length to disk until that file\n'> <'Xis closed.\n'> <'XConsequently, the temporary file would appear to be 0 bytes long if power\n'> <'Xfailed when we were editing.\n'> <'XTo avoid this problem, a sync() function has been written which will close\n'> <'Xthe temporary file and then immediately reopen it.\n'> <'X.IP "Cursor Shape" 1i\n'> <'X\\*E changes the shape of the cursor to indicate which mode you\'re in,\n'> <'Xif your terminal\'s termcap entry includes the necessary capabilities.\n'> <'X.IP "Hide nroff Lines" 1i\n'> <'XTh ":set hideformat" option hides nroff format control lines.\n'> <'X(They are displayed on the screen as blank lines.)\n'> <'X.ne 7\n'> <'X.IP "Compiler Interface" 1i\n'> <'X\\*E is clever enough to parse the error messages emitted by many compilers.\n'> <'XTo use this feature,\n'> < 'Xyou should collect your compiler\'s error messages into a file called "errlist";\n' > <'X\\*E will read this file,\n'> <'Xdetermine which source file caused the error messages,\n'> <'Xstart editing that file,\n'> <'Xmove the cursor to the line where the error was detected,\n'> <'Xand display the error message on the status line.\n'> <'XNifty!\n'> <'X.IP "Visible Text Selection" 1i\n'> <'XIn visual command mode, \'v\' starts visibly selecting characters and\n'> <'X\\&\'V\' starts visibly selecting whole lines.\n'> <'XThe character or line where the cursor is located becomes one\n'> <'Xendpoint of the selection.\n'> <'XYou can then use the standard cursor movement commands to move the cursor\n'> <'Xto the other endpoint, and then press one of the operator commands\n'> <'X(c/d/y/</>/!/=/\\\\).\n'> <'XThe operator will then immediately be applied to the selected text.\n'> <'X.IP "Pop-up Menu Operator" 1i\n'> <'XThe \'\\\\\' key is a new operator,\n'> <'Xsimilar in operation to the c/d/y/</>/! operators\n'> <'XIt conjures up a menu, from which you can select any of the other\n'> <'Xoperators plus a few other common commands.\n'> <'X.IP "Preset Filter Operator" 1i\n'> <'XThe \'=\' key is another new operator.\n'> <'XIt is similar to the \'!\' operator, except that while\n'> <'X\\&\'!\' asks you to type in a filter command each time,\n'> < 'X\\&\'=\' assumes it should always run the command stored in the \\fIequalprg\\fR option.\n' > <'X.IP "Move to a Given Percentage" 1i\n'> <'XThe \'%\' movement key can now accept an optional count.\n'> <'XWithout a count, the \'%\' key still moves to a matching parenthesis\n'> <'Xlike it always did.\n'> <'XWith a count somewhere between 1 and 100, though, it moves the cursor to\n'> <'Xapproximately a given percentage of the way through the file.\n'> <'XFor example, typing "50%" will move the cursor to the middle of the file.\n'> <'X.IP "Regular Expressions"\n'> <'XIn regular expressions, several new forms of closure operators are supported:\n'> <'X\\\\{\\fIn\\fR}, \\\\{\\fIn\\fR,\\fIm\\fR}, \\\\+, and \\\\?.\n'> <'X.NH 2\n'> <'XOmissions\n'> <'X.PP\n'> <'XThe replace mode is a hack.\n'> <'XIt doesn\'t save the text that it overwrites.\n'> <'X.PP\n'> <'XLong lines are displayed differently -- where the real vi would\n'> <'Xwrap a long line onto several rows of the screen, \\*E simply\n'> <'Xdisplays part of the line, and allows you to scroll the screen\n'> <'Xsideways to see the rest of it.\n'> <'X.PP\n'> <'XThe ":preserve" and ":recover" commands are missing.\n'> <'XSo is the -r flag.\n'> <'XI\'ve never had a good reason to use ":preserve",\n'> <'Xand since ":recover" is used so rarely\n'> <'XI decided to implement it as a separate program.\n'> <'XThere\'s no need to load the recovery code into memory every\n'> <'Xtime you edit a file, I figured.\n'> <'X.PP\n'> <'XLISP support is missing.\n'> <'XHowever, the = key is still an operator that reformats lines of text.\n'> < 'XBy default, it reformats lines by sending them through the \\fIfmt\\fP filter,\n' > <'Xbut you could write your own LISP beautifier and configure elvis to use it.\n'> <'XKey mappings could take care of most other differences.\n'> <'XAuto-indent is the only thing that is irrecoverably lost.\n'> <'X.PP\n'> <'XAutoindent mode acts a little different from the real vi, anyway.\n'> <'XIt doesn\'t handle ^^D or 0^D correctly.\n'> <'XOn the other hand, it \\fIdoes\\fP allow ^D and ^T to be used anywhere in the\n'> <'Xline, to adjust the indentation for the whole line.\n'> ] ) ) ] do_fork: T ) (C {<echo>} {<x>} {<->} {<environ.ms>}) (command.Simple words: [{<sed>} {(SQ <'/^X/s///'>)}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<environ.ms>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {(SQ <'/'>)} here_end_span_id: 746 stdin_parts: [ <'X.Go 11 "ENVIRONMENT VARIABLES"\n'> <'X.PP\n'> <'X\\*E examines several environment variables when it starts up.\n'> <'XThe values of these variables are used internally for a variety\n'> <'Xof purposes.\n'> <'XYou don\'t need to define all of these;\n'> <'Xon most systems, \\*E only requires TERM to be defined.\n'> <'XOn AmigaDOS, MS-DOS or TOS systems, even that is optional.\n'> <'X.SH\n'> <'XTERM, TERMCAP\n'> <'X.PP\n'> <'XTERM tells \\*E the name of the termcap entry to use.\n'> <'XTERMCAP may contain either the entire termcap entry,\n'> <'Xor the full pathname of the termcap file to search through.\n'> <'X.PP\n'> < 'XIf your version of \\*E is using tinytcap instead of the full termcap library,\n' > < 'Xthen the value of TERMCAP \\fIcannot\\fR contain any backslash escapes (\\\\E, \\\\r, etc.)\n' > <'Xor carat escapes (^[, ^M, etc.), because tinytcap doesn\'t understand them.\n'> <'XInstead, you should embed the actual control character into the string.\n'> <'X.SH\n'> <'XTMP, TEMP\n'> <'X.PP\n'> <'XThese only work for AmigaDOS, MS-DOS and Atari TOS.\n'> <'XEither of these variables may be used to set the "directory" option,\n'> <'Xwhich controls where temporary files are stored.\n'> <'XIf you define them both, then TMP is used, and TEMP is ignored.\n'> <'X.SH\n'> <'XLINES, COLUMNS\n'> <'X.PP\n'> <'XThe termcap entry for your terminal should specify the size of your screen.\n'> <'XIf you\'re using a windowing interface, then there is an ioctl() call which\n'> <'Xwill provide the size of the window; the ioctl() values will override the\n'> <'Xvalues in the termcap entry.\n'> <'XThe LINES and COLUMNS environment variables (if defined)\n'> <'Xwill override either of these sources.\n'> <'XThey, in turn, can be overridden by a ":set" command.\n'> <'X.PP\n'> <'XNormally, the LINES and COLUMNS variables shouldn\'t need to be defined.\n'> <'X.SH\n'> <'XEXINIT\n'> <'X.PP\n'> <'XThis variable\'s value may contain one or more colon-mode commands,\n'> <'Xwhich will be executed after all of the ".exrc" files\n'> <'Xbut before interactive editing begins.\n'> <'X.PP\n'> <'XTo put more than one command in EXINIT, you can separate the commands\n'> <'Xwith either a newline or a \'|\' character.\n'> <'X.SH\n'> <'XSHELL, COMSPEC\n'> <'X.PP\n'> <'XYou can use COMSPEC in MS-DOS, or SHELL in any other system,\n'> <'Xto specify which shell should be used for executing commands and\n'> <'Xexpanding wildcards.\n'> <'X.SH\n'> <'XHOME\n'> <'X.PP\n'> <'XThis variable should give the full pathname of your home directory.\n'> <'X\\*E needs to know the name of your home directory so it can locate\n'> <'Xthe ".exrc" file there.\n'> <'X.SH\n'> <'XTAGPATH\n'> <'X.PP\n'> <'XThis variable is used by the "ref" program.\n'> <'XIt contains a list of directories that might contain a relevent "tags" file.\n'> < 'XUnder AmigaDOS, MS-DOS or Atari TOS, the names of the directories should be separated by\n' > <'Xsemicolons (";").\n'> <'XUnder other operating systems, the names should be separated by colons (":").\n'> <'X.PP\n'> < 'XIf you don\'t define TAGPATH, then "ref" will use a default list which includes\n' > <'Xthe current directory and a few other likely places.\n'> <'XSee the definition of DEFTAGPATH at the start of ref.c for an accurate list.\n'> ] ) ) ] do_fork: T ) (C {<echo>} {<x>} {<->} {<ex.ms>}) (command.Simple words: [{<sed>} {(SQ <'/^X/s///'>)}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<ex.ms>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {(SQ <'/'>)} here_end_span_id: 1295 stdin_parts: [ <'X.Go 3 "COLON MODE COMMANDS"\n'> <'X.ID\n'> <'X.ps\n'> <'X.in 0.8i\n'> <'X.ta 2i 3.i\n'> <'X.\\" NOTE: The following macro is used to output a single line of the\n'> <'X.\\" command chart. Its usage is:\n'> <'X.\\"\n'> <'X.\\"\t\t.Cm <linespecs> <name> <arguments>...\n'> <'X.\\"\n'> <'X.de Cm\n'> <'X.if "\\\\$1"0" \\t\\\\$2\\t\\\\$3 \\\\$4 \\\\$5 \\\\$6 \\\\$7 \\\\$8 \\\\$9\n'> < 'X.if "\\\\$1"1" \\s-2[line]\\s+2\\t\\\\$2\\t\\\\$3 \\\\$4 \\\\$5 \\\\$6 \\\\$7 \\\\$8 \\\\$9\n' > < 'X.if "\\\\$1"2" \\s-2[line][,line]\\s+2\\t\\\\$2\\t\\\\$3 \\\\$4 \\\\$5 \\\\$6 \\\\$7 \\\\$8 \\\\$9\n' > <'X..\n'> <'X.if t .ds Q ``\n'> <'X.if t .ds U \'\'\n'> <'X.if n .ds Q "\n'> <'X.if n .ds U "\n'> <'X\\s+2LINES\tCOMMAND\tARGUMENTS\\s-2\n'> <'X.Cm 0 ab[br] [short] [expanded form]\n'> <'X.Cm 1 a[ppend][!]\n'> <'X.Cm 0 ar[gs] [files]\n'> <'X.Cm 0 cc [files]\n'> <'X.Cm 0 cd[!] [directory]\n'> <'X.Cm 2 c[hange]\n'> <'X.Cm 0 chd[ir][!] [directory]\n'> <'X.Cm 2 co[py] line\n'> <'X.Cm 0 col[or] [when] [[\\*Qlight\\*U] color] [\\*Qon\\*U color]\n'> <'X.Cm 2 d[elete] [\\*Ux]\n'> <'X.Cm 0 dig[raph][!] [XX [Y]]\n'> <'X.Cm 0 e[dit][!] [file]\n'> <'X.Cm 0 er[rlist][!] [errlist]\n'> <'X.Cm 0 f[ile] [file]\n'> <'X.Cm 2 g[lobal] /regexp/ command\n'> <'X.Cm 1 i[nsert]\n'> <'X.Cm 2 j[oin][!]\n'> <'X.Cm 2 l[ist]\n'> <'X.Cm 0 mak[e] [target]\n'> <'X.Cm 0 map[!] key mapped_to\n'> <'X.Cm 1 ma[rk] \\*Ux\n'> <'X.Cm 0 mk[exrc]\n'> <'X.Cm 2 m[ove] line\n'> <'X.Cm 0 n[ext][!] [files]\n'> <'X.Cm 0 N[ext][!]\n'> <'X.Cm 2 nu[mber]\n'> <'X.Cm 2 p[rint]\n'> <'X.Cm 1 pu[t] [\\*Ux]\n'> <'X.Cm 0 q[uit][!]\n'> <'X.Cm 1 r[ead] file\n'> <'X.Cm 0 rew[ind][!]\n'> <'X.Cm 0 se[t] [options]\n'> <'X.Cm 0 so[urce] file\n'> <'X.Cm 2 s[ubstitute] /regexp/replacement/[p][g][c]\n'> <'X.Cm 0 ta[g][!] tagname\n'> <'X.Cm 0 una[bbr] [short]\n'> <'X.Cm 0 u[ndo]\n'> <'X.Cm 0 unm[ap][!] key\n'> <'X.Cm 0 ve[rsion]\n'> <'X.Cm 2 v[global] /regexp/ command\n'> <'X.Cm 0 vi[sual] [filename]\n'> <'X.Cm 0 wq \n'> <'X.Cm 2 w[rite][!] [[>>]file]\n'> <'X.Cm 0 x[it][!]\n'> <'X.Cm 2 y[ank] [\\*Ux]\n'> <'X.Cm 2 ! command\n'> <'X.Cm 2 < \n'> <'X.Cm 2 = \n'> <'X.Cm 2 > \n'> <'X.Cm 2 & \n'> <'X.Cm 0 @ "" \\*Ux\n'> <'X.DE\n'> <'X.TA\n'> <'X.PP\n'> <'XTo use colon mode commands, you must switch from visual command\n'> <'Xmode to colon command mode.\n'> <'XThe visual mode commands to do this are ":" for a single colon command,\n'> <'Xor "Q" for many colon mode commands.\n'> <'X.NH 2\n'> <'XLine Specifiers\n'> <'X.PP\n'> <'XLine specifiers are always optional.\n'> < 'XThe first line specifier of most commands usually defaults to the current line.\n' > <'XThe second line specifier usually defaults to be the same\n'> <'Xas the first line specifier.\n'> <'XExceptions are :write, :global, and :vglobal, which act on all lines of the\n'> <'Xfile by default, and :!, which acts on no lines by default.\n'> <'X.PP\n'> <'XLine specifiers consist of an absolute part and a relative part.\n'> <'XThe absolute part of a line specifier may be either an explicit line number,\n'> <'Xa mark, a dot to denote the current line, a dollar sign to denote the last\n'> <'Xline of the file, or a forward or backward search.\n'> <'X.PP\n'> <'XAn explicit line number is simply a decimal number, expressed as a\n'> <'Xstring of digits.\n'> <'X.PP\n'> <'XA mark is typed in as an apostrophe followed by a letter.\n'> <'XMarks must be set before they can be used.\n'> <'XYou can set a mark in visual command mode by typing "m" and a letter,\n'> <'Xor you can set it in colon command mode via the "mark" command.\n'> <'X.PP\n'> <'XA forward search is typed in as a regular expression surrounded by\n'> <'Xslash characters; searching begins at the default line.\n'> <'XA backward search is typed in as a regular expression surrounded by\n'> <'Xquestion marks; searching begins at the line before the default line.\n'> <'X.PP\n'> <'XIf you omit the absolute part, then the default line is used.\n'> <'X.PP\n'> <'XThe relative part of a line specifier is typed as a "+" or "-" character\n'> <'Xfollowed by a decimal number.\n'> <'XThe number is added to or subtracted from the absolute part\n'> <'Xof the line specifier to produce the final line number.\n'> <'X.PP\n'> < 'XAs a special case, the % character may be used to specify all lines of the file.\n' > <'XIt is roughly equivelent to saying 1,$.\n'> <'XThis can be a handy shortcut.\n'> <'X.PP\n'> <'XSome examples:\n'> <'X.LD\n'> <'X.ps\n'> <'X.ta 0.5i 1.8i\n'> <'X\t:p\tprint the current line\n'> <'X\t:37p\tprint line 37\n'> <'X\t:\'gp\tprint the line which contains mark g\n'> <'X\t:/foo/p\tprint the next line that contains "foo"\n'> <'X\t:$p\tprint the last line of the file\n'> <'X\t:20,30p\tprint lines 20 through 30\n'> <'X\t:1,$p\tprint all lines of the file\n'> <'X\t:%p\tprint all lines of the file\n'> <'X\t:/foo/-2,+4p\tprint 5 lines around the next "foo"\n'> <'X.TA\n'> <'X.DE\n'> <'X.NH 2\n'> <'XText Entry Commands\n'> <'X.if n .ul 0\n'> <'X.ID\n'> <'X.ps\n'> <'X[line] append\n'> <'X[line][,line] change ["x]\n'> <'X[line] insert\n'> <'X.DE\n'> <'X.PP\n'> <'XThe \\fBa\\fRppend command inserts text after the specified line.\n'> <'X.PP\n'> <'XThe \\fBi\\fRnsert command inserts text before the specified line.\n'> <'X.PP\n'> <'XThe \\fBc\\fRhange command copies the range of lines into a cut buffer,\n'> <'Xdeletes them, and inserts new text where the old text used to be.\n'> <'X.PP\n'> <'XFor all of these commands, you indicate the end of the text you\'re\n'> <'Xinserting by hitting ^D or by entering a line which contains only a\n'> <'Xperiod.\n'> <'X.NH 2\n'> <'XCut & Paste Commands\n'> <'X.if n .ul 0\n'> <'X.ID\n'> <'X.ps\n'> <'X[line][,line] delete ["x]\n'> <'X[line][,line] yank ["x]\n'> <'X[line] put ["x]\n'> <'X[line][,line] copy line\n'> <'X[line][,line] to line\n'> <'X[line][,line] move line\n'> <'X.DE\n'> <'X.PP\n'> <'XThe \\fBd\\fRelete command copies the specified range of lines into a\n'> <'Xcut buffer, and then deletes them.\n'> <'X.PP\n'> <'XThe \\fBy\\fRank command copies the specified range of lines into a cut\n'> <'Xbuffer, but does *not* delete them.\n'> <'X.PP\n'> <'XThe \\fBpu\\fRt command inserts text from a cut buffer after the\n'> <'Xspecified line.\n'> <'X.PP\n'> < 'XThe \\fBco\\fRpy and \\fBt\\fRo commands yank the specified range of lines and\n' > <'Xthen immediately paste them after some other line.\n'> <'X.PP\n'> <'XThe \\fBm\\fRove command deletes the specified range of lines and then\n'> <'Ximmediately pastes them after some other line.\n'> <'XIf the destination line comes after the deleted text,\n'> <'Xthen it will be adjusted automatically to account for the deleted lines.\n'> <'X.NH 2\n'> <'XDisplay Text Commands\n'> <'X.if n .ul 0\n'> <'X.ID\n'> <'X.ps\n'> <'X[line][,line] print\n'> <'X[line][,line] list\n'> <'X[line][,line] number\n'> <'X.DE\n'> <'X.PP\n'> <'XThe \\fBp\\fRrint command displays the specified range of lines.\n'> <'X.PP\n'> <'XThe \\fBnu\\fRmber command displays the lines, with line numbers.\n'> <'X.PP\n'> <'XThe \\fBl\\fRist command also displays them, but it is careful to make\n'> <'Xcontrol characters visible.\n'> <'X.NH 2\n'> <'XGlobal Operations Commands\n'> <'X.if n .ul 0\n'> <'X.ID\n'> <'X.ps\n'> <'X[line][,line] global /regexp/ command\n'> <'X[line][,line] vglobal /regexp/ command\n'> <'X.DE\n'> <'X.PP\n'> <'XThe \\fBg\\fRlobal command searches through the lines of the specified range\n'> <'X(or through the whole file if no range is specified)\n'> <'Xfor lines that contain a given regular expression.\n'> <'XIt then moves the cursor to each of these lines and\n'> <'Xruns some other command on them.\n'> <'X.PP\n'> < 'XThe \\fBv\\fRglobal command is similar, but it searches for lines that \\fIdon\'t\\fR\n' > <'Xcontain the regular expression.\n'> <'X.NH 2\n'> <'XLine Editing Commands\n'> <'X.if n .ul 0\n'> <'X.ID\n'> <'X.ps\n'> <'X[line][,line] join[!]\n'> <'X[line][,line] ! program\n'> <'X[line][,line] <\n'> <'X[line][,line] >\n'> <'X[line][,line] substitute /regexp/replacement/[p][g][c]\n'> <'X[line][,line] &\n'> <'X.DE\n'> <'X.PP\n'> <'XThe \\fBj\\fRoin command catenates all lines in the specified range together\n'> <'Xto form one big line.\n'> <'XIf only a single line is specified, then the following line is catenated\n'> <'Xonto it.\n'> <'XThe normal ":join" inserts one or two spaces between the lines;\n'> <'Xthe ":join!" variation (with a \'!\') doesn\'t insert spaces.\n'> <'X.PP\n'> <'XThe \\fB!\\fR command runs an external filter program,\n'> <'Xand feeds the specified range of lines to it\'s stdin.\n'> <'XThe lines are then replaced by the output of the filter.\n'> <'XA typical example would be ":\'a,\'z!sort" to sort the lines \'a,\'z.\n'> <'X.PP\n'> < 'XThe \\fB<\\fR and \\fB>\\fR commands shift the specified range of lines left or right,\n' > <'Xnormally by the width of 1 tab character.\n'> <'XThe "shiftwidth" option determines the shifting amount.\n'> <'X.PP\n'> <'XThe \\fBs\\fRubstitute command finds the regular expression in each line,\n'> <'Xand replaces it with the replacement text.\n'> <'XThe "p" option causes the altered lines to be printed.\n'> <'XThe "g" option permits all instances of the regular expression\n'> <'Xto be found & replaced.\n'> <'X(Without "g", only the first occurrence in each line is replaced.)\n'> <'XThe "c" option asks for confirmation before each substitution.\n'> <'X.PP\n'> <'XThe \\fB&\\fR command repeats the previous substitution command.\n'> <'XActually, "&" is equivelent to "s//~/" with the same options as last time.\n'> < 'XIt searches for the last regular expression that you specified for any purpose,\n' > <'Xand replaces it with the the same text\n'> <'Xthat was used in the previous substitution.\n'> <'X.NH 2\n'> <'XUndo Command\n'> <'X.if n .ul 0\n'> <'X.ID\n'> <'X.ps\n'> <'Xundo\n'> <'X.DE\n'> <'X.PP\n'> <'XThe \\fBu\\fRndo command restores the file to the state it was in before\n'> <'Xyour most recent command which changed text.\n'> <'X.NH 2\n'> <'XConfiguration & Status Commands\n'> <'X.if n .ul 0\n'> <'X.ID\n'> <'X.ps\n'> <'Xmap[!] [key mapped_to]\n'> <'Xunmap[!] key\n'> <'Xabbr [word expanded_form_of_word]\n'> <'Xunabbr word\n'> <'Xdigraph[!] [XX [Y]]\n'> <'Xset [options]\n'> <'Xmkexrc\n'> <'X[line] mark "x\n'> <'Xvisual\n'> <'Xversion\n'> <'X[line][,line] =\n'> <'Xfile [file]\n'> <'Xsource file\n'> <'X@ "x\n'> <'Xcolor [when] [["light"] color] ["on" color]\n'> <'X.DE\n'> <'X.PP\n'> < 'XThe \\fBma\\fRp command allows you to configure \\*E to recognize your function keys,\n' > <'Xand treat them as though they transmitted some other sequence of characters.\n'> <'XNormally this mapping is done only when in the visual command mode,\n'> < 'Xbut with the [!] present it will map keys under input and replace modes as well.\n' > <'XWhen this command is given with no arguments,\n'> <'Xit prints a table showing all mappings currently in effect.\n'> <'XWhen called with two arguments, the first is the sequence that your\n'> <'Xfunction key really sends, and the second is the sequence that you want\n'> <'X\\*E to treat it as having sent.\n'> <'XAs a special case, if the first argument is a number then \\*E will map the\n'> <'Xcorresponding function key;\n'> <'Xfor example, ":map 7 dd" will cause the <F7> key to delete a line.\n'> <'X.PP\n'> < 'XThe \\fBunm\\fRap command removes key definitions that were made via the map command.\n' > <'X.PP\n'> <'XThe \\fBab\\fRbr command is used to define/list a table of abbreviations.\n'> <'XThe table contains both the abbreviated form and the fully spelled-out form.\n'> <'XWhen you\'re in visual input mode, and you type in the abbreviated form,\n'> <'X\\*E will replace the abbreviated form with the fully spelled-out form.\n'> <'XWhen this command is called without arguments, it lists the table;\n'> <'Xwith two or more arguments, the first argument is taken as the abbreviated\n'> <'Xform, and the rest of the command line is the fully-spelled out form.\n'> <'X.PP\n'> <'XThe \\fBuna\\fRbbr command deletes entries from the abbr table.\n'> <'X.PP\n'> < 'XThe \\fBdi\\fRgraph command allows you to display the set of digraphs that \\*E is\n' > <'Xusing, or add/remove a digraph.\n'> <'XTo list the set of digraphs, use the digraph command with no arguments.\n'> <'XTo add a digraph, you should give the digraph command two arguments.\n'> <'XThe first argument is the two ASCII characters that are to be combined;\n'> <'Xthe second is the non-ASCII character that they represent.\n'> <'XThe non-ASCII character\'s most significant bit is automatically set by the\n'> <'Xdigraph command, unless to append a ! to the command name.\n'> <'XRemoval of a digraph is similar to adding a digraph, except that you should\n'> <'Xleave off the second argument.\n'> <'X.PP\n'> <'XThe \\fBse\\fRt command allows you examine or set various options.\n'> <'XWith no arguments, it displays the values of options that have been changed.\n'> <'XWith the single argument "all" it displays the values of all options,\n'> <'Xregardless of whether they\'ve been explicitly set or not.\n'> <'XOtherwise, the arguments are treated as options to be set.\n'> <'X.PP\n'> <'XThe \\fBmk\\fRexrc command saves the current configuration to a file\n'> <'Xcalled ".exrc" in the current directory.\n'> <'X.PP\n'> <'XThe mar\\fBk\\fR command defines a named mark to refer to a specific place\n'> <'Xin the file.\n'> <'XThis mark may be used later to specify lines for other commands.\n'> <'X.PP\n'> <'XThe \\fBvi\\fRsual command puts the editor into visual mode.\n'> <'XInstead of emulating ex, \\*E will start emulating vi.\n'> <'X.PP\n'> <'XThe \\fBve\\fRrsion command tells you that what version of \\*E this is.\n'> <'X.PP\n'> <'XThe \\fB=\\fR command tells you what line you specified, or,\n'> <'Xif you specified a range of lines, it will tell you both endpoints and\n'> <'Xthe number of lines included in the range.\n'> <'X.PP\n'> <'XThe \\fBf\\fRile command tells you the name of the file,\n'> <'Xwhether it has been modified,\n'> <'Xthe number of lines in the file,\n'> <'Xand the current line number.\n'> <'XYou can also use it to change the name of the current file.\n'> <'X.PP\n'> < 'XThe \\fBso\\fRurce command reads a sequence of colon mode commands from a file,\n' > <'Xand interprets them.\n'> <'X.PP\n'> <'XThe \\fB@\\fR command executes the contents of a cut-buffer as EX commands.\n'> <'X.PP\n'> < 'XThe \\fBcol\\fRor command only works under MS-DOS, or if you have an ANSI-compatible\n' > <'Xcolor terminal.\n'> <'XIt allows you to set the foreground and background colors\n'> <'Xfor different types of text:\n'> < 'Xnormal, bold, italic, underlined, standout, pop-up menu, and visible selection.\n' > <'XBy default, it changes the "normal" colors;\n'> <'Xto change other colors, the first argument to the :color command should be\n'> <'Xthe first letter of the type of text you want.\n'> <'XThe syntax for the colors themselves is fairly intuitive.\n'> <'XFor example, ":color light cyan on blue" causes normal text to be displayed\n'> <'Xin light cyan on a blue background, and\n'> <'X":color b bright white" causes bold text to be displayed in bright white on\n'> <'Xa blue background.\n'> <'XThe background color always defaults to the current background color of\n'> <'Xnormal text.\n'> < 'XYour first :color command \\fImust\\fP specify both the foreground and background\n' > <'Xfor normal text.\n'> <'X.NH 2\n'> <'XMultiple File Commands\n'> <'X.if n .ul 0\n'> <'X.ID\n'> <'X.ps\n'> <'Xargs [files]\n'> <'Xnext[!] [files]\n'> <'XNext[!]\n'> <'Xprevious[!]\n'> <'Xrewind[!]\n'> <'X.DE\n'> <'X.PP\n'> <'XWhen you invoke \\*E from your shell\'s command line,\n'> <'Xany filenames that you give to \\*E as arguments are stored in the args list.\n'> <'XThe \\fBar\\fRgs command will display this list, or define a new one.\n'> <'X.PP\n'> <'XThe \\fBn\\fRext command switches from the current file to the next one\n'> <'Xin the args list.\n'> <'XYou may specify a new args list here, too.\n'> <'X.PP\n'> <'XThe \\fBN\\fRext and \\fBpre\\fRvious commands\n'> <'X(they\'re really aliases for the same command)\n'> <'Xswitch from the current file to the preceding file in the args list.\n'> <'X.PP\n'> <'XThe \\fBrew\\fRind command switches from the current file to the first file\n'> <'Xin the args list.\n'> <'X.NH 2\n'> <'XSwitching Files\n'> <'X.if n .ul 0\n'> <'X.ID\n'> <'X.ps\n'> <'Xedit[!] [file]\n'> <'Xtag[!] tagname\n'> <'X.DE\n'> <'X.PP\n'> < 'XThe \\fBe\\fRdit command allows to switch from the current file to some other file.\n' > <'XThis has nothing to do with the args list, by the way.\n'> <'X.PP\n'> <'XThe \\fBta\\fRg command looks up a given tagname in a file called "tags".\n'> <'XThis tells it which file the tag is in, and how to find it in that file.\n'> <'X\\*E then switches to the tag\'s file and finds the tag.\n'> <'X.NH 2\n'> <'XWorking with a Compiler\n'> <'X.if n .ul 0\n'> <'X.ID\n'> <'X.ps\n'> <'Xcc [files]\n'> <'Xmake [target]\n'> <'Xerrlist[!] [errlist]\n'> <'X.DE\n'> <'X.PP\n'> < 'XThe \\fBcc\\fR and \\fBmak\\fRe commands execute your compiler or "make" utility\n' > <'Xand redirect any error messages into a file called "errlist".\n'> <'XBy default, cc is run on the current file.\n'> <'X(You should write it before running cc.)\n'> <'XThe contents of the "errlist" file are then scanned for error messages.\n'> <'XIf an error message is found, then the cursor is moved to the line where\n'> <'Xthe error was detected,\n'> <'Xand the description of the error is displayed on the status line.\n'> <'X.PP\n'> <'XAfter you\'ve fixed one error, the \\fBer\\fRrlist command will move\n'> <'Xthe cursor to the next error.\n'> <'XIn visual command mode,\n'> <'Xhitting `*\' will do this, too.\n'> <'X.PP\n'> <'XYou can also create an "errlist" file from outside of \\*E,\n'> <'Xand use "\\*E -m" to start elvis and have the cursor moved to the\n'> <'Xfirst error.\n'> <'XNote that you don\'t need to supply a filename with "\\*E -m" because\n'> <'Xthe error messages always say which source file an error is in.\n'> <'X.PP\n'> <'XNote:\n'> <'XWhen you use errlist repeatedly to fix several errors in a single file,\n'> <'Xit will attempt to adjust the reported line numbers to allow for lines\n'> <'Xthat you have inserted or deleted.\n'> <'XThese adjustments are made with the assumption that you will work though\n'> <'Xthe file from the beginning to the end.\n'> <'X.NH 2\n'> <'XExit Commands\n'> <'X.if n .ul 0\n'> <'X.ID\n'> <'X.ps\n'> <'Xquit[!]\n'> <'Xwq\n'> <'Xxit\n'> <'X.DE\n'> <'X.PP\n'> <'XThe \\fBq\\fRuit command exits from the editor without saving your file.\n'> <'X.PP\n'> <'XThe \\fBwq\\fR command writes your file out, then then exits.\n'> <'X.PP\n'> <'XThe \\fBx\\fRit command is similar to the \\fBwq\\fR command, except that\n'> <'X\\fBx\\fRit won\'t bother to write your file if you haven\'t modified it.\n'> <'X.NH 2\n'> <'XFile I/O Commands\n'> <'X.if n .ul 0\n'> <'X.ID\n'> <'X.ps\n'> <'X[line] read file\n'> <'X[line][,line] write[!] [[>>]file]\n'> <'X.DE\n'> <'X.PP\n'> <'XThe \\fBr\\fRead command gets text from another file and inserts it\n'> <'Xafter the specified line.\n'> <'XIt can also read the output of a program;\n'> < 'Xsimply precede the program name by a \'!\' and use it in place of the file name.\n' > <'X.PP\n'> <'XThe \\fBw\\fRrite command writes the whole file, or just part of it,\n'> <'Xto some other file.\n'> <'XThe !, if present, will permit the lines to be written even if you\'ve set\n'> <'Xthe readonly option.\n'> < 'XIf you precede the filename by >> then the lines will be appended to the file.\n' > <'XYou can send the lines to the standard input of a program by replacing the\n'> <'Xfilename with a \'!\' followed by the command and its arguments.\n'> <'X.PP\n'> <'XNote: Be careful not to confuse ":w!filename" and ":w !command".\n'> <'XTo write to a program, you must have at least one blank before the \'!\'.\n'> <'X.NH 2\n'> <'XDirectory Commands\n'> <'X.if n .ul 0\n'> <'X.ID\n'> <'X.ps\n'> <'Xcd [directory]\n'> <'Xchdir [directory]\n'> <'Xshell\n'> <'X.DE\n'> <'X.PP\n'> <'XThe \\fBcd\\fR and \\fBchd\\fRir commands\n'> <'X(really two names for one command)\n'> <'Xswitch the current working directory.\n'> <'X.PP\n'> <'XThe \\fBsh\\fRell command starts an interactive shell.\n'> <'X.NH 2\n'> <'XDebugging Commands\n'> <'X.if n .ul 0\n'> <'X.ID\n'> <'X.ps\n'> <'X[line][,line] debug[!]\n'> <'Xvalidate[!]\n'> <'X.DE\n'> <'X.PP\n'> <'XThese commands are only available if you compile \\*E with the -DDEBUG flag.\n'> <'X.PP\n'> <'XThe de\\fBb\\fRug command lists statistics for the blocks which contain\n'> <'Xthe specified range of lines.\n'> <'XIf the ! is present, then the contents of those blocks is displayed, too.\n'> <'X.PP\n'> < 'XThe \\fBva\\fRlidate command checks certain variables for internal consistency.\n' > <'XNormally it doesn\'t output anything unless it detects a problem.\n'> <'XWith the !, though, it will always produce *some* output.\n'> ] ) ) ] do_fork: T ) (C {<echo>} {<x>} {<->} {<index.ms>}) (command.Simple words: [{<sed>} {(SQ <'/^X/s///'>)}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<index.ms>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {(SQ <'/'>)} here_end_span_id: 1396 stdin_parts: [ <'X.XS 1\n'> <'XINTRODUCTION\n'> <'XWhat E\\s-2LVIS\\s+2 does,\n'> <'XCopyright,\n'> <'XHow to compile E\\s-2LVIS\\s+2,\n'> <'XOverview\n'> <'X.XA 2\n'> <'XVISUAL MODE COMMANDS\n'> <'XNormal interactive editing,\n'> <'XInput mode,\n'> <'XArrow keys,\n'> <'XDigraphs,\n'> <'XAbbreviations,\n'> <'XAuto-indentation\n'> <'X.XA 3\n'> <'XCOLON MODE COMMANDS\n'> <'XLine specifiers,\n'> <'XText entry,\n'> <'XCut & paste,\n'> <'XDisplay text,\n'> <'XGlobal operations,\n'> <'XLine editing,\n'> <'XUndo,\n'> <'XConfiguration & status,\n'> <'XMultiple files,\n'> <'XSwitching files,\n'> <'XWorking with a compiler,\n'> <'XExiting,\n'> <'XFile I/O,\n'> <'XDirectory & shell,\n'> <'XDebugging\n'> <'X.XA 4\n'> <'XREGULAR EXPRESSIONS\n'> <'XSyntax,\n'> <'XOptions,\n'> <'XSubstitutions,\n'> <'XExamples\n'> <'X.XA 5\n'> <'XOPTIONS\n'> <'XAutoindent,\n'> <'XAutoprint,\n'> <'Xetc.\n'> <'X.XA 6\n'> <'XCUT BUFFERS\n'> <'XPutting text into a cut buffer,\n'> <'XPasting from a cut buffer,\n'> <'XMacros,\n'> <'XThe effect of switching files\n'> <'X.XA 7\n'> <'XDIFFERENCES BETWEEN E\\s-2LVIS\\s+2 AND THE REAL VI/EX\n'> <'XExtensions,\n'> <'XOmissions\n'> <'X.XA 8\n'> <'XINTERNAL\n'> <'XFor programmers only,\n'> <'XThe temporary file,\n'> <'XImplementation of editing,\n'> <'XMarks and the cursor,\n'> <'XColon command interpretation,\n'> <'XScreen control,\n'> <'XPortability\n'> <'X.XA 9\n'> <'XCFLAGS\n'> <'X.XA 10\n'> <'XTERMCAP\n'> <'X.XA 11\n'> <'XENVIRONMENT VARIABLES\n'> <'X.XA 12\n'> <'XVERSIONS\n'> <'X.XA 13\n'> <'XQUESTIONS & ANSWERS\n'> <'X.XE\n'> <'X.PX\n'> <'X.sp 0.3i\n'> <'X.ce 1\n'> <'XUNIX-style "man" pages appear at the end of this manual.\n'> ] ) ) ] do_fork: T ) (C {<echo>} {<x>} {<->} {<internal.ms>}) (command.Simple words: [{<sed>} {(SQ <'/^X/s///'>)}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<internal.ms>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {(SQ <'/'>)} here_end_span_id: 1653 stdin_parts: [ <'X.Go 8 "INTERNAL"\n'> <'X.PP\n'> <'XYou don\'t need to know the material in this section to use \\*E.\n'> <'XYou only need it if you intend to modify \\*E.\n'> <'X.PP\n'> <'XYou should also check out the CFLAGS, TERMCAP, ENVIRONMENT VARIABLES,\n'> <'XVERSIONS, and QUIESTIONS & ANSWERS sections of this manual.\n'> <'X.NH 2\n'> <'XThe temporary file\n'> <'X.PP\n'> <'XThe temporary file is divided into blocks of 1024 bytes each.\n'> < 'XThe functions in "blk.c" maintain a cache of the five most recently used blocks,\n' > <'Xto minimize file I/O.\n'> <'X.PP\n'> <'XWhen \\*E starts up, the file is copied into the temporary file\n'> <'Xby the function \\fBtmpstart()\\fR in "tmp.c".\n'> <'XSmall amounts of extra space are inserted into the temporary file to\n'> <'Xinsure that no text lines cross block boundaries.\n'> <'XThis speeds up processing and simplifies storage management.\n'> <'XThe extra space is filled with NUL characters.\n'> <'Xthe input file must not contain any NULs, to avoid confusion.\n'> <'XThis also limits lines to a length of 1023 characters or less.\n'> <'X.PP\n'> <'XThe data blocks aren\'t necessarily stored in sequence.\n'> <'XFor example, it is entirely possible that the data block containing\n'> <'Xthe first lines of text will be stored after the block containing the\n'> <'Xlast lines of text.\n'> <'X.PP\n'> <'XIn RAM, \\*E maintains two lists: one that describes the "proper"\n'> <'Xorder of the disk blocks, and another that records the line number of\n'> <'Xthe last line in each block.\n'> <'XWhen \\*E needs to fetch a given line of text, it uses these tables\n'> <'Xto locate the data block which contains that line.\n'> <'X.PP\n'> <'XBefore each change is made to the file, these lists are copied.\n'> <'XThe copies can be used to "undo" the change.\n'> <'XAlso, the first list\n'> <'X-- the one that lists the data blocks in their proper order --\n'> <'Xis written to the first data block of the temp file.\n'> <'XThis list can be used during file recovery.\n'> <'X.PP\n'> < 'XWhen blocks are altered, they are rewritten to a \\fIdifferent\\fR block in the file,\n' > <'Xand the order list is updated accordingly.\n'> <'XThe original block is left intact, so that "undo" can be performed easily.\n'> <'X\\*E will eventually reclaim the original block, when it is no longer needed.\n'> <'X.NH 2\n'> <'XImplementation of Editing\n'> <'X.PP\n'> <'XThere are three basic operations which affect text:\n'> <'X.ID\n'> <'X\\(bu delete text\t- delete(from, to)\n'> <'X\\(bu add text\t- add(at, text)\n'> <'X\\(bu yank text\t- cut(from, to)\n'> <'X.DE\n'> <'X.PP\n'> < 'XTo yank text, all text between two text positions is copied into a cut buffer.\n' > <'XThe original text is not changed.\n'> <'XTo copy the text into a cut buffer,\n'> <'Xyou need only remember which physical blocks that contain the cut text,\n'> <'Xthe offset into the first block of the start of the cut,\n'> <'Xthe offset into the last block of the end of the cut,\n'> <'Xand what kind of cut it was.\n'> <'X(Cuts may be either character cuts or line cuts;\n'> <'Xthe kind of a cut affects the way it is later "put".)\n'> <'XYanking is implemented in the function \\fBcut()\\fR,\n'> <'Xand pasting is implemented in the function \\fBpaste()\\fR.\n'> <'XThese functions are defined in "cut.c".\n'> <'X.PP\n'> <'XTo delete text, you must modify the first and last blocks, and\n'> <'Xremove any reference to the intervening blocks in the header\'s list.\n'> <'XThe text to be deleted is specified by two marks.\n'> <'XThis is implemented in the function \\fBdelete()\\fR.\n'> <'X.PP\n'> <'XTo add text, you must specify\n'> <'Xthe text to insert (as a NUL-terminated string)\n'> <'Xand the place to insert it (as a mark).\n'> <'XThe block into which the text is to be inserted may need to be split into\n'> <'Xas many as four blocks, with new intervening blocks needed as well...\n'> <'Xor it could be as simple as modifying a single block.\n'> <'XThis is implemented in the function \\fBadd()\\fR.\n'> <'X.PP\n'> <'XThere is also a \\fBchange()\\fR function,\n'> <'Xwhich generally just calls delete() and add().\n'> <'XFor the special case where a single character is being replaced by another\n'> <'Xsingle character, though, change() will optimize things somewhat.\n'> <'XThe add(), delete(), and change() functions are all defined in "modify.c".\n'> <'X.PP\n'> < 'XThe \\fBinput()\\fR function reads text from a user and inserts it into the file.\n' > <'XIt makes heavy use of the add(), delete(), and change() functions.\n'> <'XIt inserts characters one at a time, as they are typed.\n'> <'X.PP\n'> < 'XWhen text is modified, an internal file-revision counter, called \\fBchanges\\fR,\n' > <'Xis incremented.\n'> <'XThis counter is used to detect when certain caches are out of date.\n'> < 'X(The "changes" counter is also incremented when we switch to a different file,\n' > < 'Xand also in one or two similar situations -- all related to invalidating caches.)\n' > <'X.NH 2\n'> <'XMarks and the Cursor\n'> <'X.PP\n'> <'XMarks are places within the text.\n'> <'XThey are represented internally as 32-bit values which are split\n'> <'Xinto two bitfields:\n'> <'Xa line number and a character index.\n'> <'XLine numbers start with 1, and character indexes start with 0.\n'> <'XLines can be up to 1023 characters long, so the character index is 10 bits\n'> <'Xwide and the line number fills the remaining 22 bits in the long int.\n'> <'X.PP\n'> <'XSince line numbers start with 1,\n'> <'Xit is impossible for a valid mark to have a value of 0L.\n'> <'X0L is therefore used to represent unset marks.\n'> <'X.PP\n'> <'XWhen you do the "delete text" change, any marks that were part of\n'> <'Xthe deleted text are unset, and any marks that were set to points\n'> <'Xafter it are adjusted.\n'> <'XMarks are adjusted similarly after new text is inserted.\n'> <'X.PP\n'> <'XThe cursor is represented as a mark.\n'> <'X.NH 2\n'> <'XColon Command Interpretation\n'> <'X.PP\n'> <'XColon commands are parsed, and the command name is looked up in an array\n'> <'Xof structures which also contain a pointer to the function that implements\n'> <'Xthe command, and a description of the arguments that the command can take.\n'> <'XIf the command is recognized and its arguments are legal,\n'> <'Xthen the function is called.\n'> <'X.PP\n'> <'XEach function performs its task; this may cause the cursor to be\n'> <'Xmoved to a different line, or whatever.\n'> <'X.NH 2\n'> <'XScreen Control\n'> <'X.PP\n'> <'XIn input mode or visual command mode,\n'> <'Xthe screen is redrawn by a function called \\fBredraw()\\fR.\n'> <'XThis function is called in the getkey() function before each keystroke is\n'> <'Xread in, if necessary.\n'> <'X.PP\n'> <'XRedraw() write to the screen via a package which looks like the "curses"\n'> <'Xlibrary, but isn\'t.\n'> <'XIt is actually much simpler.\n'> <'XMost curses operations are implemented as macros which copy characters\n'> <'Xinto a large I/O buffer, which is then written with a single large\n'> <'Xwrite() call as part of the refresh() operation.\n'> <'X.PP\n'> <'X(Note: Under MS-DOS, the pseudo-curses macros check to see whether you\'re\n'> <'Xusing the pcbios interface. If you are, then the macros call functions\n'> <'Xin "pc.c" to implement screen updates.)\n'> <'X.PP\n'> < 'XThe low-level functions which modify text (namely add(), delete(), and change())\n' > <'Xsupply redraw() with clues to help redraw() decide which parts of the\n'> <'Xscreen must be redrawn.\n'> <'XThe clues are given via a function called \\fBredrawrange()\\fR.\n'> <'X.PP\n'> <'XMost EX commands use the pseudo-curses package to perform their output,\n'> <'Xlike redraw().\n'> <'X.PP\n'> < 'XThere is also a function called \\fBmsg()\\fR which uses the same syntax as printf().\n' > <'XIn EX mode, msg() writes message to the screen and automatically adds a\n'> <'Xnewline.\n'> <'XIn VI mode, msg() writes the message on the bottom line of the screen\n'> <'Xwith the "standout" character attribute turned on.\n'> <'X.NH 2\n'> <'XOptions\n'> <'X.PP\n'> <'XFor each option available through the ":set" command,\n'> <'X\\*E contains a character array variable, named "o_\\fIoption\\fR".\n'> <'XFor example, the "lines" option uses a variable called "o_lines".\n'> <'X.PP\n'> <'XFor boolean options, the array has a dimension of 1.\n'> <'XThe first (and only) character of the array will be NUL if the\n'> <'Xvariable\'s value is FALSE, and some other value if it is TRUE.\n'> <'XTo check the value, just by dereference the array name,\n'> <'Xas in "if (*o_autoindent)".\n'> <'X.PP\n'> <'XFor number options, the array has a dimension of 3.\n'> <'XThe array is treated as three unsigned one-byte integers.\n'> <'XThe first byte is the current value of the option.\n'> <'XThe second and third bytes are the lower and upper bounds of that\n'> <'Xoption.\n'> <'X.PP\n'> <'XFor string options, the array usually has a dimension of about 60\n'> <'Xbut this may vary.\n'> <'XThe option\'s value is stored as a normal NUL-terminated string.\n'> <'X.PP\n'> <'XAll of the options are declared in "opts.c".\n'> <'XMost are initialized to their default values;\n'> <'Xthe \\fBinitopts()\\fR function is used to perform any environment-specific\n'> <'Xinitialization.\n'> <'X.NH 2\n'> <'XPortability\n'> <'X.PP\n'> <'XTo improve portability, \\*E collects as many of the system-dependent\n'> <'Xdefinitions as possible into the "config.h" file.\n'> <'XThis file begins with some preprocessor instructions which attempt to\n'> <'Xdetermine which compiler and operating system you have.\n'> < 'XAfter that, it conditionally defines some macros and constants for your system.\n' > <'X.PP\n'> <'XOne of the more significant macros is \\fBttyread()\\fR.\n'> <'XThis macro is used to read raw characters from the keyboard, possibly\n'> <'Xwith timeout.\n'> <'XFor UNIX systems, this basically reads bytes from stdin.\n'> <'XFor MSDOS, TOS, and OS9, ttyread() is a function defined in curses.c.\n'> <'XThere is also a \\fBttywrite()\\fR macro.\n'> <'X.PP\n'> < 'XThe \\fBtread()\\fR and \\fBtwrite()\\fR macros are versions of read() and write() that are\n' > <'Xused for text files.\n'> <'XOn UNIX systems, these are equivelent to read() and write().\n'> <'XOn MS-DOS, these are also equivelent to read() and write(),\n'> <'Xsince DOS libraries are generally clever enough to convert newline characters\n'> <'Xautomatically.\n'> <'XFor Atari TOS, though, the MWC library is too stupid to do this,\n'> <'Xso we had to do the conversion explicitly.\n'> <'X.PP\n'> <'XOther macros may substitute index() for strchr(), or bcopy() for memcpy(),\n'> <'Xor map the "void" data type to "int", or whatever.\n'> <'X.PP\n'> <'XThe file "tinytcap.c" contains a set of functions that emulate the termcap\n'> <'Xlibrary for a small set of terminal types.\n'> <'XThe terminal-specific info is hard-coded into this file.\n'> <'XIt is only used for systems that don\'t support real termcap.\n'> <'XAnother alternative for screen control can be seen in\n'> <'Xthe "curses.h" and "pc.c" files.\n'> <'XHere, macros named VOIDBIOS and CHECKBIOS are used to indirectly call\n'> <'Xfunctions which perform low-level screen manipulation via BIOS calls.\n'> <'X.PP\n'> <'XThe stat() function must be able to come up with UNIX-style major/minor/inode\n'> <'Xnumbers that uniquely identify a file or directory.\n'> <'X.PP\n'> <'XPlease try to keep you changes localized,\n'> <'Xand wrap them in #if/#endif pairs,\n'> <'Xso that \\*E can still be compiled on other systems.\n'> <'XAnd PLEASE let me know about it, so I can incorporate your changes into\n'> <'Xmy latest-and-greatest version of \\*E.\n'> ] ) ) ] do_fork: T ) (C {<echo>} {<x>} {<->} {<intro.ms>}) (command.Simple words: [{<sed>} {(SQ <'/^X/s///'>)}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<intro.ms>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {(SQ <'/'>)} here_end_span_id: 1731 stdin_parts: [ <'X.Go 1 "INTRODUCTION"\n'> <'X.PP\n'> <'X\\*E is a clone of vi/ex, the standard UNIX editor.\n'> <'X\\*E supports nearly all of the vi/ex commands,\n'> <'Xin both visual mode and colon mode.\n'> <'X.PP\n'> <'XLike vi/ex, \\*E stores most of the text in a temporary file, instead of RAM.\n'> <'XThis allows it to edit files that are too large to fit\n'> <'Xin a single process\' data space.\n'> <'XAlso, the edit buffer can survive a power failure or crash.\n'> <'X.PP\n'> <'X\\*E runs under BSD UNIX, AT&T SysV UNIX, Minix, MS-DOS, Atari TOS,\n'> <'XCoherent, OS9/68000, VMS and AmigaDos.\n'> <'XThe next version is also expected to add MS-Windows, OS/2 and MacOS.\n'> <'XContact me before you start porting it to some other OS,\n'> <'Xbecause somebody else may have already done it for you.\n'> <'X.PP\n'> <'X\\*E is freely redistributable, in either source form or executable form.\n'> <'XThere are no restrictions on how you may use it.\n'> <'X.NH 2\n'> <'XCompiling\n'> <'X.PP\n'> <'XSee the "Versions" section of this manual for instructions on how to compile\n'> <'X\\*E.\n'> <'X.PP\n'> <'XIf you want to port \\*E to another O.S. or compiler, then\n'> <'Xyou should start be reading the "Portability" part of the "Internal" section.\n'> <'X.NH 2\n'> <'XOverview of \\*E\n'> <'X.PP\n'> <'XThe user interface of \\*E/vi/ex is weird.\n'> < 'XThere are two major command modes in \\*E, and a few text input modes as well.\n' > <'XEach command mode has a command which allows you to switch to the other mode.\n'> <'X.PP\n'> <'XYou will probably use the \\fIvisual command mode\\fR\n'> <'Xmost of the time.\n'> <'XThis is the mode that \\*E normally starts up in.\n'> <'X.PP\n'> <'XIn visual command mode, the entire screen is filled with lines of text\n'> <'Xfrom your file.\n'> <'XEach keystroke is interpretted as part of a visual command.\n'> <'XIf you start typing text, it will \\fInot\\fR be inserted,\n'> <'Xit will be treated as part of a command.\n'> <'XTo insert text, you must first give an "insert text" command.\n'> <'XThis will take some getting used to.\n'> <'X(An alternative exists.\n'> <'XLookup the "inputmode" option.)\n'> <'X.PP\n'> <'XThe \\fIcolon mode\\fR is quite different.\n'> <'X\\*E displays a ":" character on the bottom line of the screen, as a prompt.\n'> <'XYou are then expected to type in a command line and hit the <Return> key.\n'> <'XThe set of commands recognized in the colon mode is different\n'> <'Xfrom visual mode\'s.\n'> ] ) ) ] do_fork: T ) (C {<echo>} {<x>} {<->} {<options.ms>}) (command.Simple words: [{<sed>} {(SQ <'/^X/s///'>)}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<options.ms>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {(SQ <'/'>)} here_end_span_id: 2281 stdin_parts: [ <'X.Go 5 "OPTIONS"\n'> <'X.PP\n'> <'XOptions may be set or examined via the colon command "set".\n'> <'XThe values of options will affect the operation of later commands.\n'> <'X.PP\n'> <'XFor convenience, options have both a long descriptive name and a short name\n'> <'Xwhich is easy to type.\n'> <'XYou may use either name interchangably.\n'> <'XI like the short names, myself.\n'> <'X.PP\n'> <'XThere are three types of options: Boolean, string, and numeric.\n'> <'XBoolean options are made TRUE by giving the name of the option as an\n'> <'Xargument to the "set" command;\n'> <'Xthey are made FALSE by prefixing the name with "no".\n'> <'XFor example, "set autoindent" makes the autoindent option TRUE,\n'> <'Xand "set noautoindent" makes it FALSE.\n'> < 'X\\*E also allows boolean options to be toggled by prefixing the name with "neg".\n' > <'XSo, ":map g :set neglist^M" will cause the <g> key to alternately toggle the\n'> <'X"list" option on and off.\n'> <'X(The "neg" prefix is an extension; the real vi doesn\'t support it.)\n'> <'X.PP\n'> <'XTo change the value of a string or numeric option, pass the "set" command\n'> <'Xthe name of the option, followed by an "=" sign and the option\'s new value.\n'> <'XFor example, "set tabstop=8" will give the tabstop option a value of 8.\n'> <'XFor string options, you may enclose the new value in quotes.\n'> <'X.LD\n'> <'X.ta 1.9i 2.4i 3.8i\n'> <'X.ps +2\n'> <'X\\fBNAMES\tTYPE\tDEFAULT\tMEANING\\fP\n'> <'X.ps\n'> <'Xautoindent, ai\tBool\tnoai\tauto-indent during input\n'> <'Xautoprint, ap\tBool\tap\tin EX, print the current line\n'> <'Xautotab, at\tBool\tat\tauto-indent allowed to use tabs?\n'> <'Xautowrite, aw\tBool\tnoaw\tauto-write when switching files\n'> <'Xbeautify, bf\tBool\tnobf\tstrip control chars from file?\n'> <'Xcharattr, ca\tBool\tnoca\tinterpret \\\\fX sequences?\n'> <'Xcc, cc\tStr\tcc="cc -c"\tname of the C compiler\n'> <'Xcolumns, co\tNum\tco=80\twidth of the screen\n'> <'Xdigraph, dig\tBool\tnodig\trecognize digraphs?\n'> <'Xdirectory, dir\tStr\tdir="/usr/tmp"\twhere tmp files are kept\n'> <'Xedcompatible, ed\tBool\tnoed\tremember ":s//" options\n'> <'Xequalprg, ep\tBool\tep="fmt"\tprogram to run for = operator\n'> <'Xerrorbells, eb\tBool\teb\tring bell on error\n'> <'Xexrc, exrc\tBool\tnoexrc\tread "./.exrc" file?\n'> <'Xexrefresh, er\tBool\ter\twrite lines indiviually in EX\n'> <'Xflash, vbell\tBool\tflash\tuse visible alternative to bell\n'> <'Xflipcase, fc\tStr\tfc=""\tnon-ASCII chars flipped by ~\n'> <'Xhideformat, hf\tBool\thf\thide text formatter commands\n'> <'Xignorecase, ic\tBool\tnoic\tupper/lowercase match in search\n'> <'Xinputmode, im\tBool\tnoim\tstart vi in insert mode?\n'> <'Xkeytime, kt\tNum\tkt=2\ttimeout for mapped key entry\n'> <'Xkeywordprg, kp\tStr\tkp="ref"\tfull pathname of shift-K prog\n'> <'Xlines, ln\tNum\tln=25\tnumber of lines on the screen\n'> <'Xlist, li\tBool\tnoli\tdisplay lines in "list" mode\n'> <'Xmagic, ma\tBool\tma\tuse regular expression in search\n'> <'Xmake, mk\tStr\tmk="make"\tname of the "make" program\n'> <'Xmesg, ms\tBool\tms\tallow messages from other users?\n'> <'Xmodelines, ml\tBool\tnoml\tare modelines processed?\n'> <'Xmore, more\tBool\tmore\tpause between messages?\n'> <'Xnovice, nov\tBool\tnonovice\tset options for ease of use\n'> <'Xparagraphs, para\tStr\tpara="PPppIPLPQP"\tnames of "paragraph" nroff cmd\n'> <'Xprompt, pr\tBool\tpr\tshow \':\' prompt in \\fIex\\fR mode\n'> <'Xreadonly, ro\tBool\tnoro\tprevent overwriting of orig file\n'> <'Xremap, rem\tBool\tremap\tallow key maps to call key maps\n'> <'Xreport, re\tNum\tre=5\treport when 5 or more changes\n'> <'Xruler, ru\tBool\tnoru\tdisplay line/column numbers\n'> <'Xscroll, sc\tNum\tsc=12\tscroll amount for ^U and ^D\n'> <'Xsections, sect\tStr\tsect="NHSHSSSEse"\tnames of "section" nroff cmd\n'> <'Xshell, sh\tStr\tsh="/bin/sh"\tfull pathname of the shell\n'> <'Xshowmatch, sm\tBool\tnosm\tshow matching ()[]{}\n'> <'Xshowmode, smd\tBool\tnosmd\tsay when we\'re in input mode\n'> <'Xshiftwidth, sw\tNum\tsw=8\tshift amount for < and >\n'> <'Xsidescroll, ss\tNum\tss=8\tamount of sideways scrolling\n'> <'Xsync, sy\tBool\tnosy\tcall sync() often\n'> <'Xtabstop, ts\tNum\tts=8\twidth of tab characters\n'> <'Xtaglength, tl\tNum\ttl=0\tsignificant chars in tag name\n'> <'Xterm, te\tStr\tte="$TERM"\tname of the termcap entry\n'> <'Xterse, tr\tBool\tnotr\tgive shorter error messages\n'> <'Xtimeout, to\tBool\tto\tdistinguish <esc> from <arrow>?\n'> <'Xwarn, wa\tBool\twa\twarn for ! if file modified\n'> <'Xwindow, wi\tNum\twi=24\tlines to redraw after long move\n'> <'Xwrapmargin, wm\tNum\twm=0\twrap long lines in input mode\n'> <'Xwrapscan, ws\tBool\tws\tat EOF, searches wrap to line 1\n'> <'Xwriteany, wr\tBool\tnowr\tallow :w to clobber files\n'> <'X.DE\n'> <'X.TA\n'> <'X.ne 6\n'> <'X.IP "autoindent, ai"\n'> <'XDuring input mode, the autoindent option will cause each added line\n'> <'Xto begin with the same amount of leading whitespace as the line above it.\n'> <'XWithout autoindent, added lines are initially empty.\n'> <'X.IP "autoprint, ap"\n'> <'XThis option only affects EX mode.\n'> <'XIf the autoprint option on,\n'> <'Xand either the cursor has moved to a different line\n'> <'Xor the previous command modified the file,\n'> <'Xthen \\*E will print the current line.\n'> <'X.IP "autotab, at"\n'> <'XThis option affects the behaviour of the autoindent mode.\n'> <'XIf autoindent is turned off, then autotab has no effect.\n'> <'X.IP\n'> <'XWhen autotab is turned on, elvis will use a mixture of spaces and tabs\n'> <'Xto create the proper amount of indentation.\n'> <'XThis is the default.\n'> <'X.IP\n'> <'XWhen autotab is turned off, elvis will only use spaces for auto-indent.\n'> < 'X\\*E will still insert a real tab character when you hit the <Tab> key, though;\n' > <'Xthe autotab option only affects \\fIautomatic\\fR indentation.\n'> <'X.IP "autowrite, aw"\n'> <'XWhen you\'re editing one file and decide to switch to another\n'> <'X\\- via the :tag command, or :next command, perhaps \\-\n'> <'Xif your current file has been modified,\n'> <'Xthen \\*E will normally print an error message and refuse to switch.\n'> <'X.IP\n'> <'XHowever, if the autowrite option is on,\n'> <'Xthen \\*E will write the modified version of the current file\n'> <'Xand successfully switch to the new file.\n'> <'X.IP "beautify, bf"\n'> <'XThis option causes all control characters to be deleted from the text file,\n'> <'Xat the time when you start editing it.\n'> <'XIf you\'re already editing a file when you turn on the beautify option,\n'> <'Xthen that file won\'t be affected.\n'> <'X.IP cc\n'> <'XThe :cc command runs the C compiler.\n'> <'XThis option should be set to the name of your compiler.\n'> <'X.IP "charattr, ca"\n'> <'XMany text formatting programs allow you to designate portions of\n'> <'Xyour text to be underlined, italicized, or boldface by embedding\n'> <'Xthe special strings \\\\fU, \\\\fI, and \\\\fB in your text.\n'> <'XThe special string \\\\fP marks the end of underlined or boldface text.\n'> <'X.IP\n'> <'X\\*E normally treats those special strings just like any other text.\n'> <'X.IP\n'> <'XHowever, if the charattr option is on, then \\*E will interpret\n'> <'Xthose special strings correctly,\n'> <'Xto display underlined or boldface text on the screen.\n'> <'X(This only works, of course, if your terminal can display\n'> <'Xunderlined and boldface, and if the TERMCAP entry says how to do it.)\n'> <'X.IP "columns, co"\n'> <'XThis option shows how wide your screen is.\n'> <'X.IP "digraph, dig"\n'> <'XThis option is used to enable/disable recognition of digraphs.\n'> <'XThe default value is nodigraph, which means that digraphs will not be\n'> <'Xrecognized.\n'> <'X.IP "directory, dir"\n'> <'X\\*E stores text in temporary files.\n'> <'XThis option allows you to control which directory those temporary files will\n'> <'Xappear in.\n'> <'XThe default is /usr/tmp.\n'> <'X.IP\n'> <'XThis option can only be set in a .exrc file;\n'> <'Xafter that, \\*E will have already started making temporary files\n'> <'Xin some other directory, so it would be too late.\n'> <'X.IP "edcompatible, ed"\n'> <'XThis option affects the behaviour of the ":s/regexp/text/options" command.\n'> <'XIt is normally off (:se noed) which causes all of the substitution options\n'> <'Xto be off unless explicitly given.\n'> <'X.IP\n'> <'XHowever, with edcompatible on (:se ed), the substitution command remembers\n'> <'Xwhich options you used last time.\n'> <'XThose same options will continue to be used until you change them.\n'> <'XIn edcompatible mode, when you explicitly give the name of a\n'> <'Xsubstitution option, you will toggle the state of that option.\n'> <'X.IP\n'> <'XThis all seems very strange to me, but its implementation was almost free\n'> <'Xwhen I added the ":&" command to repeat the previous substitution,\n'> <'Xso there it is.\n'> <'X.IP "equalprg, ep"\n'> <'XThis holds the name & arguments of the external filter program\n'> <'Xused the the visual = operator.\n'> <'XThe defualt value is "fmt",\n'> <'Xso the = operator will adjust line breaks in text.\n'> <'X.IP "errorbells, eb"\n'> <'X\\*E normally rings a bell when you do something wrong.\n'> <'XThis option lets you disable the bell.\n'> <'X.IP exrc\n'> <'XThis option specifies whether a .exrc file in the current directory\n'> <'Xshould be executed.\n'> <'XBy default, this option is off (":set noexrc") which prevents elvis from\n'> <'Xexecuting .exrc in the current directory.\n'> <'XIf the .exrc file in your home directory turns this option on (":set exrc")\n'> < 'Xthen the \\*E will attempt to execute the .exrc file in the current directory.\n' > <'X.IP\n'> <'XThis option exist mainly for security reasons.\n'> <'XA mean-spirited person could do something like\n'> <'X.br\n'> <'X\techo >/tmp/.exrc \'!rm -rf $HOME\'\n'> <'X.br\n'> <'Xand then anybody who attempted to edit or view a file in the /tmp directory\n'> <'Xwould lose most of their files.\n'> <'XWith the exrc option turned off, this couldn\'t happen to you.\n'> <'X.IP "exrefresh, er"\n'> <'XThe EX mode of \\*E writes many lines to the screen.\n'> <'XYou can make \\*E either write each line to the screen separately,\n'> <'Xor save up many lines and write them all at once.\n'> <'X.IP\n'> <'XThe exrefresh option is normally on, so each line is written to the\n'> <'Xscreen separately.\n'> <'X.IP\n'> <'XYou may wish to turn the exrefresh option off (:se noer) if the\n'> <'X"write" system call is costly on your machine, or if you\'re using a\n'> <'Xwindowing environment.\n'> <'X(Windowing environments scroll text a lot faster when you write\n'> <'Xmany lines at once.)\n'> <'X.IP\n'> <'XThis option has no effect in visual command mode or input mode.\n'> <'X.IP "flash, vbell"\n'> <'XIf your termcap entry describes a visible alternative to ringing\n'> <'Xyour terminal\'s bell, then this option will say whether the visible\n'> <'Xversion gets used or not.\n'> <'XNormally it will be.\n'> <'X.IP\n'> <'XIf your termcap does NOT include a visible bell capability,\n'> <'Xthen the flash option will be off, and you can\'t turn it on.\n'> <'X.IP "flipcase, fc"\n'> <'XThe flipcase option allows you to control how the non-ASCII characters are\n'> <'Xaltered by the "~" command.\n'> <'X.IP\n'> <'XThe string is divided into pairs of characters.\n'> <'XWhen "~" is applied to a non-ASCII character,\n'> < 'X\\*E looks up the character in the flipcase string to see which pair it\'s in,\n' > <'Xand replaces it by the other character of the pair.\n'> <'X.IP "hideformat, hf"\n'> <'XMany text formatters require you to embed format commands in your text,\n'> <'Xon lines that start with a "." character.\n'> <'X\\*E normally displays these lines like any other text,\n'> <'Xbut if the hideformat option is on,\n'> <'Xthen format lines are displayed as blank lines.\n'> <'X.IP "ignorecase, ic"\n'> <'XNormally, when \\*E searches for text, it treats uppercase letters\n'> <'Xas being different for lowercase letters.\n'> <'X.IP\n'> < 'XWhen the ignorecase option is on, uppercase and lowercase are treated as equal.\n' > <'X.IP "inputmode, im"\n'> <'XThis option allows you to have \\*E start up in insert mode.\n'> <'XYou can still exit insert mode at any time by hitting the ESC key, as usual.\n'> <'XUsually, this option would be set in your ".exrc" file.\n'> <'X.IP "keytime, kt"\n'> <'XThe arrow keys of most terminals send a multi-character sequence.\n'> <'XIt takes a measurable amount of time for these sequences to be transmitted.\n'> <'XThe keytime option allows you to control the maximum amount of time\n'> <'Xto allow for an arrow key (or other mapped key) to be received in full.\n'> <'X.IP\n'> <'XOn most systems, the setting is the number of tenths of a second to allow\n'> <'Xbetween characters.\n'> <'XOn some other systems, the setting is in whole seconds.\n'> <'X.IP\n'> <'XTry to avoid setting keytime=1.\n'> <'XMost systems just count clock beats, so if you tried to read a character\n'> <'Xshortly before a clock beat, you could allow almost no time at all for\n'> <'Xreading the characters.\n'> <'XFor higher keytime settings, the difference is less critical.\n'> <'X.IP\n'> < 'XIf your system\'s response time is poor, you might want to increase the keytime.\n' > < 'XIn particular, I\'ve found that when keystrokes must be sent through a network\n' > <'X(via X windows, rlogin, or telnet, for example) the keytime should be set to\n'> <'Xat least 1 second.\n'> <'X.IP\n'> <'XAs a special case,\n'> <'Xyou can set keytime to 0 to disable this time limit stuff altogether.\n'> <'XThe big problem here is:\n'> <'XIf your arrow keys\' sequences start with an ESC,\n'> <'Xthen every time you hit your ESC key \\*E will wait... and wait...\n'> <'Xto see if maybe that ESC was part of an arrow key\'s sequence.\n'> <'X.IP\n'> <'XNOTE: this option is a generalization of the timeout option of the real vi.\n'> <'X.IP "keywordprg, kp"\n'> <'X\\*E has a special keyword lookup feature.\n'> <'XYou move the cursor onto a word, and hit shift-K,\n'> <'Xand \\*E uses another program to look up the word\n'> <'Xand display information about it.\n'> <'X.IP\n'> <'XThis option says which program gets run.\n'> <'X.IP\n'> <'XThe default value of this option is "ref",\n'> <'Xwhich is a program that looks up the definition of a function in C.\n'> < 'XIt looks up the function name in a file called "refs" which is created by ctags.\n' > <'X.IP\n'> <'XYou can subtitute other programs, such as an English dictionary program\n'> <'Xor the online manual.\n'> <'X\\*E runs the program, using the keyword as its only argument.\n'> <'XThe program should write information to stdout.\n'> <'XThe program\'s exit status should be 0, unless you want \\*E to print\n'> <'X"<<< failed >>>".\n'> <'X.IP "lines, ln"\n'> <'XThis option says how many lines you screen has.\n'> <'X.IP "list, li"\n'> <'XIn nolist mode (the default), \\*E displays text in a "normal" manner\n'> <'X-- with tabs expanded to an appropriate number of spaces, etc.\n'> <'X.IP\n'> <'XHowever, sometimes it is useful to have tab characters displayed differently.\n'> <'XIn list mode, tabs are displayed as "^I",\n'> <'Xand a "$" is displayed at the end of each line.\n'> <'X.IP "magic, ma"\n'> <'XThe search mechanism in \\*E can accept "regular expressions"\n'> <'X-- strings in which certain characters have special meaning.\n'> <'X.IP\n'> <'XThe magic option is normally on, which causes these characters to be treated\n'> <'Xspecially.\n'> <'X.IP\n'> <'XIf you turn the magic option off (:se noma),\n'> <'Xthen all characters except ^ and $ are treated literally.\n'> <'X^ and $ retain their special meanings regardless of the setting of magic.\n'> <'X.IP "make, mk"\n'> <'XThe :make command runs your "make" program.\n'> <'XThis option defines the name of your "make" program.\n'> <'X.IP mesg\n'> <'XWith the real vi, running under real UNIX,\n'> <'X":set nomesg" would prevent other users from sending you messages.\n'> <'X\\*E ignores it, though.\n'> <'X.IP "modelines, ml"\n'> <'X\\*E supports modelines.\n'> <'XModelines are lines near the beginning or end of your text file which\n'> <'Xcontain "ex:yowza:",\n'> <'Xwhere "yowza" is any EX command.\n'> <'XA typical "yowza" would be something like "set ts=5 ca kp=spell wm=15".\n'> <'XOther text may also appear on a modeline,\n'> <'Xso you can place the "ex:yowza:" in a comment:\n'> <'X.br\n'> <'X.ID\n'> <'X/* ex:set sw=4 ai: */\n'> <'X.DE\n'> <'X.IP\n'> <'XNormally these lines are ignored, for security reasons,\n'> <'Xbut if you have "set modelines" in your .exrc file\n'> <'Xthen "yowza" is executed.\n'> <'X.IP "novice, nov"\n'> <'XThe command ":set novice" is equivelent to ":set nomagic report=1 showmode".\n'> <'X.IP "paragraphs, pa"\n'> <'XThe { and } commands move the cursor forward or backward in increments\n'> <'Xof one paragraph.\n'> <'XParagraphs may be separated by blank lines, or by a "dot" command of\n'> <'Xa text formatter.\n'> <'XDifferent text formatters use different "dot" commands.\n'> <'XThis option allows you to configure \\*E to work with your text formatter.\n'> <'X.IP\n'> <'XIt is assumed that your formatter uses commands that start with a\n'> <'X"." character at the front of a line,\n'> <'Xand then have a one- or two-character command name.\n'> <'X.IP\n'> <'XThe value of the paragraphs option is a string in which each pair\n'> <'Xof characters is one possible form of your text formatter\'s paragraph\n'> <'Xcommand.\n'> <'X.IP "more"\n'> < 'XWhen \\*E must display a sequence of messages at the bottom line of the screen\n' > <'Xin visual mode, it normally pauses after all but the last one, so you have\n'> <'Xtime to read them all.\n'> <'X.IP\n'> <'XIf you turn off the "more" option, then \\*E will not pause.\n'> <'XThis means you can only read the last message, but it is usually the most\n'> <'Ximportant one anyway.\n'> <'X.IP "prompt, pr"\n'> <'XIf you ":set noprompt", then \\*E will no longer emit a \':\' when it\n'> <'Xexpects you to type in an \\fIex\\fR command.\n'> <'XThis is slightly useful if you\'re using an astonishingly slow UNIX machine,\n'> <'Xbut the rest of us can just ignore this one.\n'> <'X.IP "readonly, ro"\n'> <'XNormally, \\*E will let you write back any file to which you have\n'> <'Xwrite permission.\n'> <'XIf you don\'t have write permission, then you can only write the changed\n'> <'Xversion of the file to a \\fIdifferent\\fP file.\n'> <'X.IP\n'> <'XIf you set the readonly option,\n'> < 'Xthen \\*E will pretend you don\'t have write permission to \\fIany\\fP file you edit.\n' > <'XIt is useful when you really only mean to use \\*E to look at a file,\n'> <'Xnot to change it.\n'> <'XThis way you can\'t change it accidentally.\n'> <'X.IP\n'> <'XThis option is normally off, unless you use the "view" alias of \\*E.\n'> <'X"View" is like "vi" except that the readonly option is on.\n'> <'X.IP "remap"\n'> <'XThe ":map" command allows you to convert one key sequence into another.\n'> <'XThe remap option allows you to specify what should happen if portions of\n'> <'Xthat other sequence are also in the map table.\n'> <'XIf remap is on, then those portions will also be mapped, just as if they\n'> <'Xhad been typed on the keyboard.\n'> <'XIf remap is off, then the matching portions will not be mapped.\n'> <'X.IP\n'> <'XFor example, if you enter the commands ":map A B" and ":map B C",\n'> <'Xthen when remap is on, A will be converted to C.\n'> <'XBut when remap is off, A will be converted only to B.\n'> <'X.IP "report, re"\n'> <'XCommands in \\*E may affect many lines.\n'> <'XFor commands that affect a lot of lines, \\*E will output a message saying\n'> <'Xwhat was done and how many lines were affected.\n'> <'XThis option allows you to define what "a lot of lines" means.\n'> <'XThe default is 5, so any command which affects 5 or more lines will cause\n'> <'Xa message to be shown.\n'> <'X.IP "ruler, ru"\n'> <'XThis option is normally off.\n'> <'XIf you turn it on, then \\*E will constantly display the line/column numbers\n'> <'Xof the cursor, at the bottom of the screen.\n'> <'X.IP "scroll, sc"\n'> <'XThe ^U and ^D keys normally scroll backward or forward by half a screenful,\n'> <'Xbut this is adjustable.\n'> <'XThe value of this option says how many lines those keys should scroll by.\n'> <'XIf you invoke ^U or ^D with a count argument (for example, "33^D") then\n'> <'Xthis option\'s value is set to the count.\n'> <'X.IP "sections, se"\n'> <'XThe [[ and ]] commands move the cursor backward or forward in increments of\n'> <'X1 section.\n'> <'XSections may be delimited by a { character in column 1\n'> <'X(which is useful for C source code)\n'> <'Xor by means of a text formatter\'s "dot" commands.\n'> <'X.IP\n'> <'XThis option allows you to configure \\*E to work with your text formatter\'s\n'> <'X"section" command, in exectly the same way that the paragraphs option makes\n'> <'Xit work with the formatter\'s "paragraphs" command.\n'> <'X.IP "shell, sh"\n'> <'XWhen \\*E forks a shell\n'> <'X(perhaps for the :! or :shell commands)\n'> <'Xthis is the program that is uses as a shell.\n'> <'XThis is "/bin/sh" by default,\n'> <'Xunless you have set the SHELL (or COMSPEC, for MS-DOS) environment variable,\n'> <'Xit which case the default value is copied from the environment.\n'> <'X.IP "shiftwidth, sw"\n'> < 'XThe < and > commands shift text left or right by some uniform number of columns.\n' > <'XThe shiftwidth option defines that "uniform number".\n'> <'XThe default is 8.\n'> <'X.IP "showmatch, sm"\n'> <'XWith showmatch set,\n'> <'Xin input mode every time you hit one of )}],\n'> <'X\\*E will momentarily move the cursor to the matching ({[.\n'> <'X.IP "showmode, smd"\n'> < 'XIn visual mode, it is easy to forget whether you\'re in the visual command mode\n' > <'Xor input/replace mode.\n'> < 'XNormally, the showmode option is off, and you haven\'t a clue as to which mode\n' > <'Xyou\'re in.\n'> < 'XIf you turn the showmode option on, though, a little message will appear in the\n' > <'Xlower right-hand corner of your screen, telling you which mode you\'re in.\n'> <'X.IP "sidescroll, ss"\n'> <'XFor long lines, \\*E scrolls sideways.\n'> <'X(This is different from the real vi,\n'> <'Xwhich wraps a single long line onto several rows of the screen.)\n'> <'X.IP\n'> <'XTo minimize the number of scrolls needed,\n'> <'X\\*E moves the screen sideways by several characters at a time.\n'> < 'XThe value of this option says how many characters\' widths to scroll at a time.\n' > <'X.IP\n'> <'XGenerally, the faster your screen can be redrawn,\n'> <'Xthe lower the value you will want in this option.\n'> <'X.IP "sync, sy"\n'> <'XIf the system crashes during an edit session, then most of your work\n'> <'Xcan be recovered from the temporary file that \\*E uses to store\n'> <'Xchanges.\n'> <'XHowever, sometimes the OS will not copy changes to the\n'> <'Xhard disk immediately, so recovery might not be possible.\n'> <'XThe [no]sync option lets you control this.\n'> <'X.IP\n'> < 'XIn nosync mode (which is the default, for UNIX), \\*E lets the operating system\n' > <'Xcontrol when data is written to the disk.\n'> <'XThis is generally faster.\n'> <'X.IP\n'> <'XIn sync mode (which is the default for MS-DOS, AmigaDos, and Atari TOS),\n'> <'X\\*E forces all changes out\n'> <'Xto disk every time you make a change.\n'> <'XThis is generally safer, but slower.\n'> <'XIt can also be a rather rude thing to do on a multi-user system.\n'> <'X.IP "tabstop, ts"\n'> <'XTab characters are normally 8 characters wide,\n'> <'Xbut you can change their widths by means of this option.\n'> <'X.IP "taglength, tl"\n'> <'XThis option allows you to specify how many characters of a tag\'s name\n'> <'Xmust match when performing tag lookup.\n'> <'XAs a special case, ":set taglength=0" means that all characters of a tag\'s\n'> <'Xname must match.\n'> <'X.IP\n'> <'XNote: some configurations of \\*E don\'t support this option.\n'> <'X.IP "term, te"\n'> <'XThis read-only option shows the name of the termcap entry that\n'> <'X\\*E is using for your terminal.\n'> <'X.IP "terse, tr"\n'> <'XThe real vi uses this option to select longer vs. shorter error messages.\n'> < 'X\\*E has only one set of error messages, though, so this option has no effect.\n' > <'X.IP "timeout, to"\n'> <'XThe command ":set notimeout" is equivelent to ":set keytime=0",\n'> <'Xand ":set timeout" is equivelent to ":set keytime=1".\n'> <'XThis affects the behaviour of the <Esc> key.\n'> <'XSee the discussion of the "keytime" option for more information.\n'> <'X.IP "warn, wa"\n'> <'XIf you have modified a file but not yet written it back to disk, then\n'> <'X\\*E will normally print a warning before executing a ":!cmd" command.\n'> <'XHowever, in nowarn mode, this warning is not given.\n'> <'X.IP\n'> <'X\\*E also normally prints a message after a successful search that\n'> <'Xwrapped at EOF.\n'> <'XThe [no]warn option can also disable this warning.\n'> <'X.IP "window, wi"\n'> <'XThis option controls how many lines are redrawn after a long move.\n'> <'X.IP\n'> <'XOn fast terminals, this is usually set to the number of rows that the\n'> <'Xterminal can display, minus one.\n'> <'XThis causes the entire screen to be filled with text around the cursor.\n'> <'X.IP\n'> <'XOn slow terminals, you may wish to reduce this value to about 7 or so.\n'> <'XThat way, if you\'re doing something like repeatedly hitting \'n\' to search\n'> < 'Xfor each occurrence of some string and trying to find a particular occurrence,\n' > <'Xthen you don\'t need to wait as long for \\*E to redraw the screen after each\n'> <'Xsearch.\n'> <'X.IP "wrapmargin, wm"\n'> <'XNormally (with wrapmargin=0) \\*E will let you type in extremely long\n'> <'Xlines, if you wish.\n'> <'X.IP\n'> <'XHowever, with warpmargin set to something other that 0 (wrapmargin=10\n'> <'Xis nice), \\*E will automatically cause long lines to be "wrapped"\n'> <'Xon a word break for lines come too close to the right-hand margin.\n'> <'XFor example: On an 80-column screen, ":set wm=10" will cause lines to\n'> <'Xwrap when their length exceeds 70 columns.\n'> <'X.IP "wrapscan, ws"\n'> <'XNormally, when you search for something, \\*E will find it no matter\n'> <'Xwhere it is in the file.\n'> <'X\\*E starts at the cursor position, and searches forward.\n'> <'XIf \\*E hits EOF without finding what you\'re looking for,\n'> <'Xthen it wraps around to continue searching from line 1.\n'> <'XIf you turn off the wrapscan option (:se nows),\n'> <'Xthen when \\*E hits EOF during a search, it will stop and say so.\n'> <'X.IP "writeany, wr"\n'> <'XWith "writeany" turned off, elvis will prevent you from accidentally\n'> <'Xoverwriting a file.\n'> <'XFor example, if "foo" exists then ":w foo" will fail.\n'> <'XIf you turn on the "writeany" option, then ":w foo" will work.\n'> <'X.IP\n'> <'XRegardless of the setting of "writeany", though, ":w! foo" will work.\n'> < 'XThe \'!\' forces the ":w" command to write the file unless the operating system\n' > <'Xwon\'t allow it.\n'> ] ) ) ] do_fork: T ) (C {<echo>} {<x>} {<->} {<question.ms>}) (command.Simple words: [{<sed>} {(SQ <'/^X/s///'>)}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<question.ms>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {(SQ <'/'>)} here_end_span_id: 2470 stdin_parts: [ <'X.nr Qn 0 1\n'> <'X.de QQ\n'> <'X.sp\n'> <'X.IP \\fB\\\\n+(Qn) 0.3i\n'> <'X..\n'> <'X.de AA\n'> <'X.IP \\fR 0.75i\n'> <'X..\n'> <'X.Go 13 "QUESTIONS & ANSWERS"\n'> <'X.QQ\n'> <'XHow can I make elvis run faster under DOS?\n'> <'X.AA\n'> <'XThere are several things you can do.\n'> <'XThe first thing to do is get a good screen driver such as NANSI.SYS.\n'> <'XThis can speed up screen redrawing by as much as a factor of eight!\n'> <'XThe DOS-specific part of section 12 tells you how to do this.\n'> <'X.AA\n'> <'XYou might also consider reducing the size of the blocks that elvis uses.\n'> <'XYou\'ll need to recompile \\*E to do this.\n'> <'XThe default BLKSIZE is 1024 byte for the DOS version of \\*E, which means\n'> <'Xthat for each keystroke that you insert, elvis must shift an average of\n'> <'Xabout 500 bytes.\n'> <'XThat\'s a lot to ask from a little old 5MHz 8088.\n'> <'XA BLKSIZE of 512 bytes might be more appropriate.\n'> <'X.AA\n'> <'XIf you\'re \\fIreally\\fR desperate for more speed, you might want to make\n'> <'X\\*E store its temporary files on a RAM disk.\n'> <'XHowever, this limits the size of the file you can edit, and it eliminates any\n'> <'Xchance you may have had to recover your work after a power failure\n'> <'Xor system crash, but it might be worth it; you decide.\n'> <'XTo do this, add ":set dir=R:\\\\" (or whatever your RAM disk\'s name is)\n'> <'Xto the \\fIelvis.rc\\fP file.\n'> <'X.AA\n'> <'XNext, consider turning off the "sync" option.\n'> <'XWhen the sync option is turned on, \\*E will close the temporary file\n'> <'Xand reopen it after every change, in order to force DOS to update\n'> <'Xthe file\'s directory entry.\n'> <'XIf you put ":set nosync" into the \\fIelvis.rc\\fP file, then elvis will\n'> <'Xonly close the file when you start editing a different text file, or\n'> <'Xwhen you\'re exiting \\*E.\n'> <'XConsequently, there is no chance that you\'ll be able to recover your\n'> <'Xchanges after a power failure... so if you\'re going to this, then you\n'> <'Xmight as well store the temp files on the RAM disk, too.\n'> <'X.QQ\n'> <'XWhere\'s the <Esc> key on a DEC keyboard?\n'> <'X.AA\n'> <'XI don\'t know. Maybe the <F11> key?\n'> <'XYou could always use ":map!" to make some other key act like the <Esc> key.\n'> <'XIf all else fails, use <Control><[>.\n'> <'X.QQ\n'> <'XIs there a way to show which keys do what?\n'> <'X.AA\n'> <'XYes. The command ":map" will show what each key does in command mode,\n'> <'Xand ":map!" (with an exclamation mark) shows what each key does in\n'> <'Xinput mode.\n'> <'X.AA\n'> <'XThe table is divided into three columns: the key\'s label, the characters\n'> <'Xthat it sends, and the characters that \\*E pretends you typed.\n'> <'X.QQ\n'> <'XHow can I make \\*E display long lines like the real vi?\n'> <'X.AA\n'> <'XYou can\'t yet.\n'> <'XThe next version of \\*E shouldsupport this, though.\n'> <'X.QQ\n'> <'XI can\'t recover my text [under MS-DOS or Atari TOS].\n'> <'XAccording to the directory listing, the temporary file is 0 bytes long.\n'> <'XWhat went wrong?\n'> <'X.AA\n'> <'XMS-DOS and TOS only update a file\'s directory entry when the file is closed.\n'> <'XIf the system crashes while the file is still open, then the file\'s length\n'> <'Xis stored as 0 bytes.\n'> <'XThe ":set sync" option is supposed to prevent this;\n'> <'Xyou probably turned it off in the interest of speed, right?\n'> <'X.AA\n'> <'XUnder MS-DOS [I don\'t know about TOS], you should delete the empty\n'> <'Xtemporary file, and then run CHKDSK/F.\n'> <'XThis \\fImight\\fP find the data that belonged in the empty file,\n'> < 'Xand place it in a new file with a name like "000001.CHK" -- something like that.\n' > <'XYou can then try to extract the text from that temporary file by giving the\n'> <'Xcommand "elvprsv -R 000001.chk >goodnews.txt".\n'> <'XIf you\'re lucky, then your text might be in GOODNEWS.TXT.\n'> <'X.QQ\n'> <'XWhat is the most current version of \\*E?\n'> <'X.AA\n'> <'XEach version of \\*E that is released to the public has a version number\n'> <'Xof the form "number point number".\n'> <'XAs I write this, the most current version of elvis is 1.5.\n'> <'X.AA\n'> <'XThe intermediate steps between one release and the next are labeled with\n'> <'Xthe \\fInext\\fP version number, with a letter appended.\n'> <'XFor example, after 1.4 was released, I started working on 1.5a.\n'> <'XI am currently working on 2.0a.\n'> <'XWhen \\*E reaches a stable state, I\'ll call it 2.0 and release it.\n'> <'X.AA\n'> <'XSometimes a beta-test version of elvis will be available via anonymous FTP\n'> <'Xfrom m2xenix.psg.com, in the directory "pub/elvis/beta".\n'> <'X.QQ\n'> <'XI only got executables, but now I want the source code.\n'> <'XWhere can I get it?\n'> <'X.AA\n'> <'XIf you have access to the Internet, then you should be able to fetch it\n'> <'Xfrom one of the public archives such as \\fBplains.nodak.edu\\fP.\n'> <'XIt is accessible via anonymous FTP, or via an email server named\n'> <'X"archive-server@plains.nodak.edu".\n'> <'XElvis is located in the directory "/pub/Minix/all.contrib".\n'> <'X.AA\n'> <'XI will also offer it to the C Users\' Group.\n'> <'XThey sell C source code for us$8 per diskette\n'> <'X(or slightly more outside North America).\n'> <'XTheir phone number is (913) 841-1631,\n'> <'Xand their address is:\n'> <'X.ID\n'> <'XThe C Users\' Group\n'> <'XPO Box 3127\n'> <'XLawrence KS 66046-0127\n'> <'X.DE\n'> <'X.QQ\n'> <'XIs this shareware, or public domain, or what?\n'> <'X.AA\n'> <'XIt is not public domain; it is copyrighted by me, Steve Kirkendall.\n'> <'XHowever, this particular version is freely redistributable, in either\n'> <'Xsource form or executable form.\n'> <'X(I would prefer that you give copies away for free, complete with the\n'> <'Xfull source code... but I\'m not going to force you.)\n'> <'X.AA\n'> <'XIt is not shareware; you aren\'t expected to send me anything.\n'> <'XYou can use it without guilt.\n'> <'X.AA\n'> <'XIt is not "copylefted."\n'> < 'XI hold a copyright, but currently I have not added any of the usual restrictions\n' > <'Xthat you would find on copylefted software.\n'> <'XIf people start doing really obnoxious things to \\*E, then I will start\n'> <'Xadding restrictions to subsequent versions, but earlier versions won\'t\n'> <'Xbe affected.\n'> <'X(So far, everybody has been pretty good about this so no restrictions\n'> <'Xhave been necessary.)\n'> <'X.QQ\n'> <'XCan I reuse parts of your source code?\n'> <'X.AA\n'> <'XYes. Please be careful, though, to make sure that the code really is mine.\n'> <'XSome of the code was contributed by other people, and I don\'t have the\n'> <'Xauthority to give you permission to use it.\n'> <'XThe author\'s name can be found near the top of each source file.\n'> <'XIf it says "Steve Kirkendall" then you may use it;\n'> <'Xotherwise, you\'d better contact the author first.\n'> <'X.AA\n'> <'XPlease don\'t remove my name from the source code.\n'> <'XIf you modify the source, please make a note of that fact in a comment\n'> <'Xnear the top of the source code.\n'> <'XAnd, finally, please mention my name in your documentation.\n'> <'X.QQ\n'> <'XCan \\*E work with non-ASCII files?\n'> <'X.AA\n'> <'X\\*E can\'t edit binary files because it can\'t handle the NUL character,\n'> <'Xand because of line-length limitations.\n'> <'XHowever, it is 8-bit clean so you should be able to edit any European\n'> <'Xextended ASCII file without any surprises.\n'> <'X.AA\n'> <'X\\*E has also been modified to work with 16-bit character sets.\n'> <'XYongguang Zhang (ygz@cs.purdue.edu) has created a Chinese version of \\*E\n'> <'Xthat uses 16-bit characters and runs under cxterm (Chinese X-term)\n'> <'Xon X-windows systems.\n'> <'XJunichiro Itoh (itojun@foretune.co.jp) has modified \\*E to edit Japanese\n'> <'Xtext under MS-DOS.\n'> ] ) ) ] do_fork: T ) (C {<echo>} {<x>} {<->} {<regexp.ms>}) (command.Simple words: [{<sed>} {(SQ <'/^X/s///'>)}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<regexp.ms>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {(SQ <'/'>)} here_end_span_id: 2676 stdin_parts: [ <'X.Go 4 "REGULAR EXPRESSIONS"\n'> <'X\n'> <'X.PP\n'> <'X\\*E uses regular expressions for searching and substututions.\n'> <'XA regular expression is a text string in which some characters have\n'> <'Xspecial meanings.\n'> <'XThis is much more powerful than simple text matching.\n'> <'X.SH\n'> <'XSyntax\n'> <'X.PP\n'> <'X\\*E\' regexp package treats the following one- or two-character\n'> <'Xstrings (called meta-characters) in special ways:\n'> <'X.IP "\\\\\\\\\\\\\\\\(\\fIsubexpression\\fP\\\\\\\\\\\\\\\\)" 0.8i\n'> <'XThe \\\\( and \\\\) metacharacters are used to delimit subexpressions.\n'> <'XWhen the regular expression matches a particular chunk of text,\n'> < 'X\\*E will remember which portion of that chunk matched the \\fIsubexpression\\fP.\n' > <'XThe :s/regexp/newtext/ command makes use of this feature.\n'> <'X.IP "^" 0.8i\n'> <'XThe ^ metacharacter matches the beginning of a line.\n'> <'XIf, for example, you wanted to find "foo" at the beginning of a line,\n'> <'Xyou would use a regular expression such as /^foo/.\n'> <'XNote that ^ is only a metacharacter if it occurs\n'> <'Xat the beginning of a regular expression;\n'> <'Xanyplace else, it is treated as a normal character.\n'> <'X.IP "$" 0.8i\n'> <'XThe $ metacharacter matches the end of a line.\n'> <'XIt is only a metacharacter when it occurs at the end of a regular expression;\n'> <'Xelsewhere, it is treated as a normal character.\n'> <'XFor example, the regular expression /$$/ will search for a dollar sign at\n'> <'Xthe end of a line.\n'> <'X.IP "\\\\\\\\\\\\\\\\<" 0.8i\n'> <'XThe \\\\< metacharacter matches a zero-length string at the beginning of\n'> <'Xa word.\n'> <'XA word is considered to be a string of 1 or more letters and digits.\n'> <'XA word can begin at the beginning of a line\n'> <'Xor after 1 or more non-alphanumeric characters.\n'> <'X.IP "\\\\\\\\\\\\\\\\>" 0.8i\n'> <'XThe \\\\> metacharacter matches a zero-length string at the end of a word.\n'> <'XA word can end at the end of the line\n'> <'Xor before 1 or more non-alphanumeric characters.\n'> <'XFor example, /\\\\<end\\\\>/ would find any instance of the word "end",\n'> <'Xbut would ignore any instances of e-n-d inside another word\n'> <'Xsuch as "calendar".\n'> <'X.IP "\\&." 0.8i\n'> <'XThe . metacharacter matches any single character.\n'> <'X.IP "[\\fIcharacter-list\\fP]" 0.8i\n'> <'XThis matches any single character from the \\fIcharacter-list\\fP.\n'> <'XInside the \\fIcharacter-list\\fP, you can denote a span of characters\n'> <'Xby writing only the first and last characters, with a hyphen between\n'> <'Xthem.\n'> <'XIf the \\fIcharacter-list\\fP is preceded by a ^ character, then the\n'> <'Xlist is inverted -- it will match character that \\fIisn\'t\\fP mentioned\n'> <'Xin the list.\n'> <'XFor example, /[a-zA-Z]/ matches any letter, and /[^ ]/ matches anything\n'> <'Xother than a blank.\n'> <'X.IP "\\\\\\\\\\\\\\\\{\\fIn\\fP\\\\\\\\\\\\\\\\}" 0.8i\n'> <'XThis is a closure operator,\n'> <'Xwhich means that it can only be placed after something that matches a\n'> <'Xsingle character.\n'> <'XIt controls the number of times that the single-character expression\n'> <'Xshould be repeated.\n'> <'X.IP "" 0.8i\n'> <'XThe \\\\{\\fIn\\fP\\\\} operator, in particular, means that the preceding\n'> <'Xexpression should be repeated exactly \\fIn\\fP times.\n'> <'XFor example, /^-\\\\{80\\\\}$/ matches a line of eighty hyphens, and\n'> <'X/\\\\<[a-zA-Z]\\\\{4\\\\}\\\\>/ matches any four-letter word.\n'> <'X.IP "\\\\\\\\\\\\\\\\{\\fIn\\fP,\\fIm\\fP\\\\\\\\\\\\\\\\}" 0.8i\n'> <'XThis is a closure operator which means that the preceding single-character\n'> < 'Xexpression should be repeated between \\fIn\\fP and \\fIm\\fP times, inclusive.\n' > <'XIf the \\fIm\\fP is omitted (but the comma is present) then \\fIm\\fP is\n'> <'Xtaken to be inifinity.\n'> <'XFor example, /"[^"]\\\\{3,5\\\\}"/ matches any pair of quotes which contains\n'> <'Xthree, four, or five non-quote characters.\n'> <'X.IP "*" 0.8i\n'> <'XThe * metacharacter is a closure operator which means that the preceding\n'> <'Xsingle-character expression can be repeated zero or more times.\n'> <'XIt is equivelent to \\\\{0,\\\\}.\n'> <'XFor example, /.*/ matches a whole line.\n'> <'X.IP "\\\\\\\\\\\\\\\\+" 0.8i\n'> <'XThe \\\\+ metacharacter is a closure operator which means that the preceding\n'> <'Xsingle-character expression can be repeated one or more times.\n'> <'XIt is equivelent to \\\\{1,\\\\}.\n'> <'XFor example, /.\\\\+/ matches a whole line, but only if the line contains\n'> <'Xat least one character.\n'> <'XIt doesn\'t match empty lines.\n'> <'X.IP "\\\\\\\\\\\\\\\\?" 0.8i\n'> <'XThe \\\\? metacharacter is a closure operator which indicates that the\n'> <'Xpreceding single-character expression is optional -- that is, that it\n'> <'Xcan occur 0 or 1 times.\n'> <'XIt is equivelent to \\\\{0,1\\\\}.\n'> <'XFor example, /no[ -]\\\\?one/ matches "no one", "no-one", or "noone".\n'> <'X.PP\n'> <'XAnything else is treated as a normal character which must exactly match\n'> <'Xa character from the scanned text.\n'> <'XThe special strings may all be preceded by a backslash to\n'> <'Xforce them to be treated normally.\n'> <'X.SH\n'> <'XSubstitutions\n'> <'X.PP\n'> <'XThe :s command has at least two arguments: a regular expression,\n'> <'Xand a substitution string.\n'> <'XThe text that matched the regular expression is replaced by text\n'> <'Xwhich is derived from the substitution string.\n'> <'X.br\n'> <'X.ne 15 \\" so we don\'t mess up the table\n'> <'X.PP\n'> <'XMost characters in the substitution string are copied into the\n'> <'Xtext literally but a few have special meaning:\n'> <'X.LD\n'> <'X.ta 0.75i 1.3i\n'> <'X\t&\tInsert a copy of the original text\n'> <'X\t~\tInsert a copy of the previous replacement text\n'> <'X\t\\\\1\tInsert a copy of that portion of the original text which\n'> <'X\t\tmatched the first set of \\\\( \\\\) parentheses\n'> <'X\t\\\\2-\\\\9\tDo the same for the second (etc.) pair of \\\\( \\\\)\n'> <'X\t\\\\U\tConvert all chars of any later & or \\\\# to uppercase\n'> <'X\t\\\\L\tConvert all chars of any later & or \\\\# to lowercase\n'> <'X\t\\\\E\tEnd the effect of \\\\U or \\\\L\n'> <'X\t\\\\u\tConvert the first char of the next & or \\\\# to uppercase\n'> <'X\t\\\\l\tConvert the first char of the next & or \\\\# to lowercase\n'> <'X.TA\n'> <'X.DE\n'> <'X.PP\n'> <'XThese may be preceded by a backslash to force them to be treated normally.\n'> <'XIf "nomagic" mode is in effect,\n'> <'Xthen & and ~ will be treated normally,\n'> <'Xand you must write them as \\\\& and \\\\~ for them to have special meaning.\n'> <'X.SH\n'> <'XOptions\n'> <'X.PP\n'> <'X\\*E has two options which affect the way regular expressions are used.\n'> <'XThese options may be examined or set via the :set command.\n'> <'X.PP\n'> <'XThe first option is called "[no]magic".\n'> <'XThis is a boolean option, and it is "magic" (TRUE) by default.\n'> <'XWhile in magic mode, all of the meta-characters behave as described above.\n'> <'XIn nomagic mode, only ^ and $ retain their special meaning.\n'> <'X.PP\n'> <'XThe second option is called "[no]ignorecase".\n'> <'XThis is a boolean option, and it is "noignorecase" (FALSE) by default.\n'> < 'XWhile in ignorecase mode, the searching mechanism will not distinguish between\n' > <'Xan uppercase letter and its lowercase form.\n'> <'XIn noignorecase mode, uppercase and lowercase are treated as being different.\n'> <'X.PP\n'> <'XAlso, the "[no]wrapscan" option affects searches.\n'> <'X.SH\n'> <'XExamples\n'> <'X.PP\n'> <'XThis example changes every occurence of "utilize" to "use":\n'> <'X.sp\n'> <'X.ti +1i\n'> <'X:%s/utilize/use/g\n'> <'X.PP\n'> <'XThis example deletes all whitespace that occurs at the end of a line anywhere\n'> <'Xin the file.\n'> <'X(The brackets contain a single space and a single tab.):\n'> <'X.sp\n'> <'X.ti +1i\n'> <'X:%s/[ ]\\\\+$//\n'> <'X.PP\n'> <'XThis example converts the current line to uppercase:\n'> <'X.sp\n'> <'X.ti +1i\n'> <'X:s/.*/\\\\U&/\n'> <'X.PP\n'> <'XThis example underlines each letter in the current line,\n'> <'Xby changing it into an "underscore backspace letter" sequence.\n'> <'X(The ^H is entered as "control-V backspace".):\n'> <'X.sp\n'> <'X.ti +1i\n'> <'X:s/[a-zA-Z]/_^H&/g\n'> <'X.PP\n'> <'XThis example locates the last colon in a line,\n'> <'Xand swaps the text before the colon with the text after the colon.\n'> <'XThe first \\\\( \\\\) pair is used to delimit the stuff before the colon,\n'> <'Xand the second pair delimit the stuff after.\n'> <'XIn the substitution text, \\\\1 and \\\\2 are given in reverse order\n'> <'Xto perform the swap:\n'> <'X.sp\n'> <'X.ti +1i\n'> <'X:s/\\\\(.*\\\\):\\\\(.*\\\\)/\\\\2:\\\\1/\n'> ] ) ) ] do_fork: T ) (C {<echo>} {<x>} {<->} {<termcap.ms>}) (command.Simple words: [{<sed>} {(SQ <'/^X/s///'>)}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<termcap.ms>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {(SQ <'/'>)} here_end_span_id: 2842 stdin_parts: [ <'X.Go 10 "TERMCAP"\n'> <'X.PP\n'> <'X\\*E uses fairly standard termcap fields for most things.\n'> <'XI invented the cursor shape names\n'> <'Xbut other than that there should be few surprises.\n'> <'X.SH\n'> <'XRequired numeric fields\n'> <'X.if n .ul 0\n'> <'X.ID\n'> <'X:co#:\tnumber of columns on the screen (chars per line)\n'> <'X:li#:\tnumber of lines on the screen\n'> <'X.DE\n'> <'X.SH\n'> <'XRequired string fields\n'> <'X.ID\n'> <'X.if n .ul 0\n'> <'X:ce=:\tclear to end-of-line\n'> <'X:cl=:\thome the cursor & clear the screen\n'> <'X:cm=:\tmove the cursor to a given row/column\n'> <'X:up=:\tmove the cursor up one line\n'> <'X.DE\n'> <'X.SH\n'> <'XBoolean fields\n'> <'X.if n .ul 0\n'> <'X.ID\n'> <'X:am:\tauto margins - wrap when char is written in last column?\n'> <'X:xn:\tbrain-damaged auto margins - newline ignored after wrap\n'> <'X:pt:\tphysical tabs?\n'> <'X.DE\n'> <'X.SH\n'> <'XOptional string fields\n'> <'X.if n .ul 0\n'> <'X.ID\n'> <'X:al=:\tinsert a blank row on the screen\n'> <'X:dl=:\tdelete a row from the screen\n'> <'X:cd=:\tclear to end of display\n'> <'X:ei=:\tend insert mode\n'> <'X:ic=:\tinsert a blank character\n'> <'X:im=:\tstart insert mode\n'> <'X:dc=:\tdelete a character\n'> <'X:sr=:\tscroll reverse (insert row at top of screen)\n'> <'X:vb=:\tvisible bell\n'> <'X:ti=:\tterminal initialization string, to start full-screen mode\n'> <'X:te=:\tterminal termination, to end full-screen mode\n'> <'X:ks=:\tenables the cursor keypad\n'> <'X:ke=:\tdisables the cursor keypad\n'> <'X.DE\n'> <'X.SH\n'> <'XOptional strings received from the keyboard\n'> <'X.if n .ul 0\n'> <'X.ID\n'> <'X:kd=:\tsequence sent by the <down arrow> key\n'> <'X:kl=:\tsequence sent by the <left arrow> key\n'> <'X:kr=:\tsequence sent by the <right arrow> key\n'> <'X:ku=:\tsequence sent by the <up arrow> key\n'> <'X:kP=:\tsequence sent by the <PgUp> key\n'> <'X:kN=:\tsequence sent by the <PgDn> key\n'> <'X:kh=:\tsequence sent by the <Home> key\n'> <'X:kH=:\tsequence sent by the <End> key\n'> <'X:kI=:\tsequence sent by the <Insert> key\n'> <'X.DE\n'> <'X.PP\n'> <'XOriginally, termcap didn\'t have any names for the <PgUp>, <PgDn>, <Home>,\n'> <'Xand <End> keys.\n'> <'XAlthough the capability names shown in the table above are the most common,\n'> <'Xthey are \\fInot\\fR universal.\n'> <'XSCO Xenix uses :PU=:PD=:HM=:EN=: for those keys.\n'> <'XAlso, if the four arrow keys happen to be part of a 3x3 keypad,\n'> <'Xthen the five non-arrow keys may be named :K1=: through :K5=:,\n'> <'Xso an IBM PC keyboard may be described using those names instead.\n'> <'X\\*E can find any of these names.\n'> <'X.SH\n'> <'XOptional strings sent by function keys\n'> <'X.if n .ul 0\n'> <'X.ID\n'> <'X:k1=:...:k9=:k0=:\tcodes sent by <F1> through <F10> keys\n'> <'X:s1=:...:s9=:s0=:\tcodes sent by <Shift F1> ... <Shift F10>\n'> <'X:c1=:...:c9=:c0=:\tcodes sent by <Ctrl F1> ... <Ctrl F10>\n'> <'X:a1=:...:a9=:a0=:\tcodes sent by <Alt F1> ... <Alt F10>\n'> <'X.DE\n'> <'X.PP\n'> <'XNote that :k0=: is used to describe the <F10> key.\n'> <'XSome termcap documents recommend :ka=: or even :k;=: for describing\n'> <'Xthe <F10> key, but \\*E doesn\'t support that.\n'> <'X.PP\n'> <'XAlso, the :s1=:..., :c1=:..., and :a1=:... codes are very non-standard.\n'> <'XThe terminfo library doesn\'t support them.\n'> <'X.SH\n'> <'XOptional fields that describe character attributes\n'> <'X.if n .ul 0\n'> <'X.ID\n'> <'X:so=:se=:\tstart/end standout mode (We don\'t care about :sg#:)\n'> <'X:us=:ue=:\tstart/end underlined mode\n'> <'X:md=:me=:\tstart/end boldface mode\n'> <'X:as=:ae=:\tstart/end alternate character set (italics)\n'> <'X:ug#:\t\tvisible gap left by :us=:ue=:md=:me=:as=:ae=:\n'> <'X.DE\n'> <'X.SH\n'> <'XOptional fields that affect the cursor\'s shape\n'> <'X.PP\n'> <'XThe :cQ=: string is used by \\*E immediately before exiting to undo\n'> <'Xthe effects of the other cursor shape strings.\n'> <'XIf :cQ=: is not given, then all other cursor shape strings are ignored.\n'> <'X.ID\n'> <'X:cQ=:\tnormal cursor\n'> <'X:cX=:\tcursor used for reading EX command\n'> <'X:cV=:\tcursor used for reading VI commands\n'> <'X:cI=:\tcursor used during VI input mode\n'> <'X:cR=:\tcursor used during VI replace mode\n'> <'X.DE\n'> <'X.PP\n'> <'XIf the capabilities above aren\'t given, then \\*E will try to use the\n'> <'Xfollowing values instead.\n'> <'X.ID\n'> <'X:ve=:\tnormal cursor, used as :cQ=:cX=:cI=:cR=:\n'> <'X:vs=:\tgaudy cursor, used as :cV=:\n'> <'X.DE\n'> <'X.SH\n'> <'XAn example\n'> <'X.PP\n'> <'XHere\'s the termcap entry I use on my Minix-ST system.\n'> <'XSome of the fields in it have nothing to do with \\*E.\n'> <'XSome can only work on my system;\n'> <'XI have modified my kernel\'s screen driver.\n'> <'X.sp\n'> <'X.LD\n'> <'X.ne 14\n'> <'Xmx|minix|minixst|ansi:\\\\\n'> <'X\t:is=\\\\E[0~:co#80:li#25:bs:pt:\\\\\n'> <'X\t:cm=\\\\E[%i%d;%dH:up=\\\\E[A:do=^J:nd=\\\\E[C:sr=\\\\EM:\\\\\n'> <'X\t:cd=\\\\E[J:ce=\\\\E[K:cl=\\\\E[H\\\\E[J:\\\\\n'> <'X\t:al=\\\\E[L:dl=\\\\E[M:ic=\\\\E[@:dc=\\\\E[P:im=:ei=:\\\\\n'> <'X\t:so=\\\\E[7m:se=\\\\E[m:us=\\\\E[4m:ue=\\\\E[m:\\\\\n'> <'X\t:md=\\\\E[1m:me=\\\\E[m:as=\\\\E[1;3m:ae=\\\\E[m:\\\\\n'> <'X\t:ku=\\\\E[A:kd=\\\\E[B:kr=\\\\E[C:kl=\\\\E[D:\\\\\n'> <'X\t:k1=\\\\E[1~:k2=\\\\E[2~:k3=\\\\E[3~:k4=\\\\E[4~:k5=\\\\E[5~:\\\\\n'> <'X\t:k6=\\\\E[6~:k7=\\\\E[17~:k8=\\\\E[18~:k9=\\\\E[19~:k0=\\\\E[20~:\\\\\n'> <'X\t:kU=\\\\E[36~:kQ=\\\\E[32~:kH=\\\\E[28~:\\\\\n'> <'X\t:GV=3:GH=D:G1=?:G2=Z:G3=@:G4=Y:GC=E:GL=4:GR=C:GU=A:GD=B:\\\\\n'> <'X\t:cQ=\\\\E[k:cX=\\\\E[2;0k:cV=\\\\E[16;0k:cI=\\\\E[k:cR=\\\\E[16;20k:\n'> <'X.DE\n'> ] ) ) ] do_fork: T ) (C {<echo>} {<x>} {<->} {<title.ms>}) (command.Simple words: [{<sed>} {(SQ <'/^X/s///'>)}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<title.ms>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {(SQ <'/'>)} here_end_span_id: 2901 stdin_parts: [ <'X.de tE\n'> <'X.ps 80\n'> <'X.ce 1\n'> <'X\\*E\n'> <'X..\n'> <'X.de nE\n'> <'X.ce 7\n'> <'X####### \n'> <'X# # # # # #### \n'> <'X# # # # # # \n'> <'X##### # # # # #### \n'> <'X# # # # # #\n'> <'X# # # # # # #\n'> <'X####### ###### ## # #### \n'> <'X..\n'> <'X.sp |2i\n'> <'X.if t .tE\n'> <'X.if n .nE\n'> <'X.ps 10\n'> <'X.sp 1\n'> <'X.ce 2\n'> <'X- a clone of vi/ex -\n'> <'Xversion \\*V\n'> <'X.sp |7.5i\n'> <'X.IP Author: 0.9i\n'> <'XSteve Kirkendall\n'> <'X.br\n'> <'X14407 SW Teal Blvd., Apt C\n'> <'X.br\n'> <'XBeaverton, OR 97005\n'> <'X.IP E-Mail: 0.9i\n'> <'Xkirkenda@cs.pdx.edu\n'> <'X.IP Phone: 0.9i\n'> <'X(503) 643-6980\n'> ] ) ) ] do_fork: T ) (C {<echo>} {<x>} {<->} {<ver.ms>}) (command.Simple words: [{<sed>} {(SQ <'/^X/s///'>)}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<ver.ms>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {(SQ <'/'>)} here_end_span_id: 2940 stdin_parts: [ <'X.ds V 1.5j-betatest\n'> <'X.if t .ds E E\\s-2LVIS\\s+2\n'> <'X.if n .ds E Elvis\n'> <'X.\\"\n'> <'X.\\" usage: .Go <section#> <title>\n'> <'X.de Go\n'> <'X.ds LH "\\\\$1-\\\\\\\\n%\n'> <'X.ds RH "\\\\$1-\\\\\\\\n%\n'> <'X.ds CH "\\\\$2\n'> <'X.NH S \\\\$1\n'> <'X\\\\$2\n'> <'X.\\"if !\\\\n%=1 .bp 1\n'> <'X.if n .ul 0\n'> <'X..\n'> ] ) ) ] do_fork: T ) (C {<echo>} {<x>} {<->} {<versions.ms>}) (command.Simple words: [{<sed>} {(SQ <'/^X/s///'>)}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<versions.ms>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {(SQ <'/'>)} here_end_span_id: 3343 stdin_parts: [ <'X.Go 12 "VERSIONS"\n'> <'X.PP\n'> <'X\\*E currently works under BSD UNIX, AT&T System-V UNIX, SCO XENIX,\n'> <'XMinix, Coherent, MS-DOS, Atari TOS, OS9/68k, VAX/VMS, and AmigaDos.\n'> <'XThis section of the manual provides special information that applies to each\n'> <'Xparticular version of \\*E.\n'> <'X.PP\n'> <'XFor all versions except MS-DOS,\n'> <'Xthe file "Makefile.mix" should be copied to "Makefile",\n'> <'Xand then edited to select the correct set of options for your system.\n'> <'XThere is more information about this embedded in the file itself.\n'> <'X.NH 2\n'> <'XBSD UNIX\n'> <'X.PP\n'> <'XTemporary files are stored in /tmp.\n'> <'X.PP\n'> <'XYou should modify /etc/rc so that\n'> <'Xthe temp files are preserved when the system is rebooted.\n'> <'XFind a line in /etc/rc which reads\n'> <'X.br\n'> <'X.ti +0.5i\n'> <'Xex4.3preserve /tmp\n'> <'X.PP\n'> <'Xor something like that, and append the following line after it:\n'> <'X.br\n'> <'X.ti +0.5i\n'> <'Xelvprsv /tmp/elv*\n'> <'X.PP\n'> <'XIf you do not have permission to modify /etc/rc, don\'t fret.\n'> <'XThe above modification is only needed to allow you to recover your changes\n'> <'Xafter a system crash.\n'> <'XYou can still run \\*E without that modification,\n'> <'Xand you can still recover your changes when \\*E crashes\n'> <'Xor when your dialup modem looses the carrier signal, or something like that.\n'> <'XOnly a system crash or power failure could hurt you.\n'> <'X.PP\n'> <'XBoth \\*E and the real Vi\n'> <'Xread initialization commands from a file called ".exrc",\n'> <'Xbut the commands in that file might work on one but not the other.\n'> <'XFor example, "set keywordprg=man" will work for \\*E,\n'> <'Xbut Vi will complain because it doesn\'t have a "keywordprg" option.\n'> <'XIf the warning messages annoy you, then you can edit the config.h file\n'> <'Xto change the name of the initialization file ".exrc" to something else,\n'> <'Xsuch as ".elvisrc".\n'> <'X.PP\n'> <'XIf you use X windows, you may wish to add "-DCS_LATIN1" to CFLAGS.\n'> <'XThis will cause the digraph table and the flipcase option to have default\n'> <'Xvalues that are appropriate for the LATIN-1 character set.\n'> <'XThat\'s the standard character set for X.\n'> <'X.PP\n'> <'XThe default keyboard macro time-out value is larger for BSD than it is for\n'> < 'Xsome other systems, because I\'ve had trouble running \\*E via rlogin or Xterm.\n' > <'XI guess it takes a while for those keystokes to squirt through the net.\n'> <'X.NH 2\n'> <'XSystem-V UNIX\n'> <'X.PP\n'> <'XMost SysV UNIX systems use terminfo instead of termcap,\n'> <'Xbut the terminfo library doesn\'t seem to have a standard name.\n'> <'XAs shipped, Elvis\' Makefile.mix is configured with "LIBS=-lterm".\n'> <'XYou may need to change it to "LIBS=-ltermcap" or "LIBS=-lterminfo"\n'> <'Xor even "LIBS=-lcurses".\n'> <'X.PP\n'> <'XThe /etc/rc file should be modified as described for BSD systems, above.\n'> <'XThe only difference is that SysV systems tend to have directories for\n'> <'Xinitialization, instead of a single large /etc/rc file.\n'> <'XEditor recovery is usually done somewhere in the /etc/rc2.d directory.\n'> <'X.PP\n'> <'XThe potential trouble with ".exrc" described above for BSD UNIX applies\n'> <'Xto System-V UNIX as well.\n'> <'X.PP\n'> <'X\\*E uses control-C as the interrupt key, not Delete.\n'> <'X.NH 2\n'> <'XSCO Xenix\n'> <'X.PP\n'> <'XFor Xenix-386, you can use the generic System-V settings.\n'> <'XYou may wish to add "-DCS_IBMPC" to CFLAGS, to have the digraph table and\n'> <'Xflipcase option start up in a mode that is appropriate for the console.\n'> <'X\n'> <'XThere is a separate group of settings for use with Xenix-286.\n'> <'XIt already has "-DCS_IBMPC" in CFLAGS.\n'> <'X.PP\n'> <'XBecause Xenix is so similar to System-V, everything I said earlier about\n'> <'XSystem-V applies to the Xenix version too, except that editor recovery\n'> <'Xprobably belongs in a directory called /etc/rc.d/8.\n'> <'X.NH 2\n'> <'XMinix\n'> <'X.PP\n'> <'XThere are separate settings in Makefile.mix for Minix-PC and Minix-68k.\n'> <'XThe differences between these two are that\n'> <'Xthe 68k version uses ".o" for the object file extension where\n'> <'Xthe PC version uses ".s", and\n'> <'Xthe PC version has some extra flags in CFLAGS to reduce the size of \\*E.\n'> < 'XThe PC version also uses tinytcap (instead of the full termcap) to make it smaller.\n' > <'X.PP\n'> <'XMinix-PC users should read the CFLAGS section of this manual very carefully.\n'> <'XYou have some choices to make...\n'> <'X.PP\n'> <'XThe temporary files are stored in /usr/tmp.\n'> <'XThe /usr/tmp directory must exist before you run \\*E,\n'> <'Xand it must be readable/writable by everybody.\n'> <'XWe use /usr/tmp instead of /tmp because\n'> <'Xafter a system crash or power failure,\n'> <'Xyou can recover the altered version of a file from the temporary file\n'> <'Xin /usr/tmp.\n'> <'XIf it was stored in /tmp, though, then it would be lost because /tmp is\n'> <'Xnormally located on the RAM disk.\n'> <'X.PP\n'> <'X\\*E uses control-C as the interrupt key, not Delete.\n'> <'X.NH 2\n'> <'XCoherent\n'> <'X.PP\n'> <'X\\*E was ported to Coherent by Esa Ahola.\n'> <'X.PP\n'> <'X\\*E is too large to run under Coherent unless you eliminate some\n'> <'Xfeatures via the CFLAGS setting.\n'> <'XThe recommended settings, in Makefile.mix, produce a working version\n'> <'Xof \\*E which emulates Vi faithfully, but lacks most of the extensions.\n'> <'XYou should read the CFLAGS section of this manual carefully.\n'> <'X.PP\n'> < 'XYou can probably reduce the size of \\*E by using tinytcap.c instead of -lterm.\n' > <'XThis would allow you to keep most features of \\*E,\n'> <'Xat the expense of terminal independence.\n'> <'X(Tinytcap.c has ANSI escape sequences hard-coded into it.)\n'> <'XTo use tinytcap, just add "tinytcap.o" to the "EXTRA=" line in the Makefile,\n'> <'Xand remove "-lterm" from the "LIBS=" line.\n'> <'X.PP\n'> <'XThe temporary files are stored in /tmp.\n'> <'XYou should modify your /etc/rc file as described for BSD earlier.\n'> <'X.NH 2\n'> <'XMS-DOS\n'> <'X.PP\n'> <'X\\*E was ported to MS-DOS by Guntram Blohm and Martin Patzel.\n'> <'XWillett Kempton added support for the DEC Rainbow.\n'> <'X.PP\n'> <'XIdeally, \\*E should be compiled with Microsoft C 5.10 and the standard\n'> <'XMicrosoft Make utility,\n'> <'Xvia the command "make elvis.mak".\n'> <'XThis will compile \\*E and all related utilities.\n'> <'X.PP\n'> <'XWith Microsoft C 6.00, you may have trouble compiling regexp.c.\n'> <'XIf so, try compiling it without optimization.\n'> <'X.PP\n'> <'XThe "Makefile.mix" file contains a set of suggested settings for compiling\n'> <'Xelvis with Turbo-C or Borland C.\n'> <'X(If you have Turbo-C, but not the Make utility,\n'> <'Xthen you can \\fIalmost\\fR use the "\\*E.prj" file to compile \\*E,\n'> < 'Xbut you must explicitly force Turbo-C to compile it with the "medium" memory model.\n' > <'XMost of the related programs [ctags, ref, virec, refont, and wildcard] are\n'> <'Xonly one file long, so you should have no trouble compiling them.)\n'> <'XThe "alias.c" file is meant to be compiled once into an executable named\n'> <'X"ex.exe".\n'> <'XYou should then copy "ex.exe" to "vi.exe" and "view.exe".\n'> <'X.PP\n'> <'X\\*E stores its temporary files in C:\\\\tmp.\n'> <'XIf this is not satisfactory, then you should edit the CFLAGS line of\n'> <'Xyour Makefile to change TMPDIR to something else before compiling.\n'> <'XYou can also control the name of the temp directory via an environment\n'> <'Xvariable named TMP or TEMP.\n'> <'XThe directory must exist before you can run \\*E.\n'> <'X.PP\n'> <'XThe TERM environment variable determines how elvis will write to the screen.\n'> <'XIt can be set to any one of the following values:\n'> <'X.LD\n'> <'X.ta 1.5i 2.5i\n'> <'X\tpcbios\tUse BIOS calls on an IBM-PC clone.\n'> <'X\trainbow\tUse DEC Rainbow interface.\n'> <'X\tansi\tUse ANSI.SYS driver.\n'> <'X\tnansi\tUser faster NANSI.SYS driver.\n'> <'X.DE\n'> <'X.PP\n'> <'XIf the TERM variable isn\'t set, then elvis will automatically select either\n'> < 'Xthe "rainbow" interface (when run on a Rainbow) or "pcbios" (on an IBM clone).\n' > <'X.PP\n'> <'XYou may prefer to use NANSI.SYS for speed;\n'> <'Xor you may NEED to use ANSI.SYS for a non-clone, such as a lap-top.\n'> <'XIf so, you should\n'> <'Xinstall one of these drivers by adding "driver = nansi.sys" (or whatever)\n'> <'Xto your CONFIG.SYS file,\n'> <'Xand then you should define TERM to be "nansi" (or whatever) by adding\n'> <'X"set TERM=nansi" to your AUTOEXEC.BAT file.\n'> <'XYou must then reboot for these changes to take effect.\n'> <'XAfter that, \\*E will notice the "TERM" setting and use the driver.\n'> <'X.PP\n'> <'XSince ".exrc" is not a valid DOS filename,\n'> <'Xthe name of the initialization file has been changed to "elvis.rc".\n'> <'XElvis will look for an "elvis.rc" file first in your home directory,\n'> <'Xand then in the current directory.\n'> <'XNote that you must set an environment variable named "HOME" to the\n'> <'Xfull pathname of your home directory, for Elvis to check there;\n'> <'Xif "HOME" isn\'t set, then Elvis will only look in the current directory.\n'> <'XTo set "HOME", you would typically add the following line to your\n'> <'XAUTOEXEC.BAT file:\n'> <'X.br\n'> <'X.ti +0.5i\n'> <'Xset HOME c:\\\\\n'> <'X.PP\n'> <'XAn extra program, called "wildcard", is needed for MS-DOS.\n'> <'XIt expands wildcard characters in file names.\n'> <'XIf \\*E flashes a "Bad command or filename" message when it starts,\n'> <'Xthen you\'ve probably lost the WILDCARD.EXE program somehow.\n'> <'X.PP\n'> <'X\\*E can run under Windows, but only in full-screen mode.\n'> <'XAlso, Windows uses an environment variable called TEMP which interferes with\n'> <'Xelvis\' usage of TEMP;\n'> <'Xto work around this, you can simply set an environment variable named\n'> <'XTMP (with no \'E\') to the name of elvis\' temporary directory.\n'> <'XWhen TEMP and TMP are both set, \\*E uses TMP and ignored TEMP.\n'> <'X.NH 2\n'> <'XAtari TOS\n'> <'X.PP\n'> <'X\\*E was ported to Atari TOS by Guntram Blohm and Martin Patzel.\n'> <'XIt is very similar to the MS-DOS version.\n'> <'XIt has been tested with the Mark Williams C compiler and also GNU-C.\n'> <'X.PP\n'> <'XThe TERM environment variable is ignored;\n'> <'Xthe ST port always assumes that TERM=vt52.\n'> <'XThe SHELL (not COMSPEC!) variable should be set to\n'> <'Xthe name of a line-oriented shell.\n'> <'X.PP\n'> <'XA simple shell in included with \\*E.\n'> <'XIts source is in "shell.c", and the name of the executable is "shell.ttp".\n'> <'XThe file "profile.sh" should contain a set of instructions to be executed\n'> <'Xwhen the shell first starts up.\n'> <'XAn example of this file is included, but you will almost certainly want to\n'> <'Xedit it right away to match your configuration.\n'> <'X(If you already have a command-line shell,\n'> <'Xthen you\'ll probably want to continue using it.\n'> <'XThe shell that comes with \\*E is very limited.)\n'> <'X.PP\n'> <'XCurrently, character attributes cannot be displayed on the screen.\n'> <'X.PP\n'> <'X\\*E runs under MiNT (a free multi-tasking extension to TOS)\n'> <'Xbut it can be a CPU hog because of the way that \\*E reads from the\n'> <'Xkeyboard with timeout.\n'> <'XAlso, \\*E doesn\'t use any of the special features of MiNT.\n'> <'XI have received a set of patches that optimize \\*E for MiNT,\n'> <'Xbut they arrived too late to integrate into this release.\n'> <'X.NH 2\n'> <'XOS9/68k\n'> <'X.PP\n'> <'X\\*E was ported to OS9/68k by Peter Reinig.\n'> <'X.PP\n'> <'XThe Makefile is currently configured to install \\*E and the related\n'> <'Xprograms in /dd/usr/cmds\n'> <'XIf this this is unacceptable, then you should change the BIN setting\n'> <'Xto some other directory.\n'> <'XSimilarly, it expects the source code to reside in /dd/usr/src/elvis;\n'> <'Xthe ODIR setting is used to control this.\n'> <'X.PP\n'> <'XTemporary files are stored in the /dd/tmp directory.\n'> <'XYour /dd/startup file may need to be modified\n'> <'Xto prevent it from deleting \\*E\' temporary files;\n'> <'Xmake /dd/startup run the \\fIelvprsv\\fR program before it wipes out /dd/tmp.\n'> <'X.PP\n'> <'XThe program in alias.c is linked repeatedly to produce the\n'> <'X"vi", "view", and "input" aliases for \\*E.\n'> <'XSadly, the "ex" alias is impossible to implement under OS9\n'> <'Xbecause the shell has a built-in command by that name.\n'> <'X.PP\n'> <'XFor some purposes,\n'> <'Xyou must give `make\' the "-b" option.\n'> <'XSpecifically, you need this for "make -b clean" and "make -b install".\n'> <'X.NH 2\n'> <'XVAX/VMS\n'> <'X.PP\n'> <'XJohn Campbell ported \\*E to VAX/VMS.\n'> <'X.PP\n'> <'XA heavily laden VAX can take half an hour to compile elvis.\n'> <'XThis is normal.\n'> <'XDon\'t panic.\n'> <'X.PP\n'> <'XWhile running, elvis will create temporary files in SYS$SCRATCH.\n'> <'XEnter SHOW LOGICAL SYS$SCRATCH to see what actual directory you are using.\n'> <'XMany sites have SYS$SCRATCH equivalenced to SYS$LOGIN.\n'> < 'XThe elvis temporary files look like the following on VMS while elvis is running:\n' > <'X.br\n'> <'X.ti 0.75i\n'> <'XELV_1123A.1;1 ELV_1123A.2;1 SO070202.;1\n'> <'X.PP\n'> <'XAlso, filtering commands (like !!dir and !}fmt) should work on VMS.\n'> <'XThis assumes, however, that you can create temporary mailboxes and that\n'> <'Xyour mailbox quota (a sysgen parameter) is at least 256 bytes for a\n'> <'Xsingle write to the mailbox.\n'> <'XThis is the default sysgen parameter,\n'> <'Xso there should be few people who experience filter problems.\n'> <'X.PP\n'> <'XAdditionally, an attempt was made to support the standard terminals on VMS:\n'> <'X"vt52", "vt100", "vt200", "vt300", "vt101", "vt102".\n'> <'XNon-standard terminals could be supported by setting your terminal type to\n'> <'XUNKNOWN (by entering SET TERM/UNKNOWN)\n'> <'Xand defining the logical name ELVIS_TERM.\n'> <'XWhatever ELVIS_TERM translates to, however, will have to be included in\n'> <'Xtinytcap.c.\n'> <'XNote that the upper/lowercase distinctions are significant,\n'> <'Xand that DCL will upshift characters that are not quoted strings, so\n'> <'Xenter DEFINE ELVIS_TERM "hp2621a".\n'> <'XAs distributed, it would probably not be a good idea to have more than the\n'> <'Xstandard terminals in tinytcap.c (else it wouldn\'t be tiny, would it?).\n'> <'XChanges here, of course, would require a recompilation to take effect.\n'> <'X.PP\n'> <'XIf you have a version of the "termcap" library and database on your system,\n'> <'Xthen you may wish to replace tinytcap with the real termcap.\n'> <'X.NH 2\n'> <'XAmigaDOS\n'> <'X.PP\n'> <'XMike Rieser and Dale Rahn ported \\*E to AmigaDOS.\n'> <'X.PP\n'> <'XThe port was done using Manx Aztec C version 5.2b.\n'> <'X\\*E uses about as much space as it can and still be small code and data.\n'> < 'X\\*E should also compile under DICE, though there may be a little trouble with\n' > <'Xsigned versus unsigned chars.\n'> <'X.PP\n'> < 'XThe port has been done so the same binary will run under both versions of AmigaDOS.\n' > <'XUnder AmigaDOS 2.04, \\*E supports all the documented features.\n'> <'XIt also uses an external program ref to do tag lookup.\n'> <'XSo, the accompanying programs: ref and ctags are recommended.\n'> <'XUnder AmigaDOS 1.2/1.3 \\*E works, buts lacks the more advanced features.\n'> <'X.PP\n'> <'XFor the port to AmigaDOS 2.04, we tried to use as many Native AmigaDOS\n'> <'Xcalls as we could.\n'> <'XThis should increase Elvis\'s chances at being compiled with other compilers.\n'> <'XDICE seems to have a different default char type.\n'> <'XYou may need to use the UCHAR() macro in tio.c.\n'> <'XTo test it, try the :map command; if it looks right, things are cool.\n'> <'X.PP\n'> <'XFor the port to AmigaDOS 1.3, we tried to make sure the program was at\n'> <'Xleast usable.\n'> <'XMany features are missing, most notably running commands in subshells.\n'> <'XAlso, what we could get working, we used Aztec functions to support them,\n'> <'Xso this part is little more compiler dependent.\n'> <'X.PP\n'> <'XAztec is compatible with the SAS libcall #pragma.\n'> <'XI personally prefer using the includes that come from Commodore over the ones\n'> <'Xsupplied with Aztec, but for people with a straight Aztec installation,\n'> <'XI went with the default names for the Aztec pragmas.\n'> <'X.PP\n'> <'XOne include you\'ll need is <sys/types.h>.\n'> <'XIts a common include when porting software just make yourself one.\n'> < 'XIts a two line file that saves a lot of hassle especially in the elvis source.\n' > <'XSo, make a directory where your includes are located called `sys\'\n'> <'Xand in a file below that type:\n'> <'X.br\n'> <'X.ti +0.8i\n'> <'X/* sys/types.h */\n'> <'X.br\n'> <'X.ti +0.8i\n'> <'X#include <exec/types.h>\n'> <'X.PP\n'> <'XWhen setting environment variables (either local or global) for\n'> <'Xvariables that specify a directory, make sure the variable ends in `:\'\n'> <'Xor `/\'.\n'> <'XThis saved from having to change much of the way elvis works.\n'> <'XThe default temporary directory (if TEMP and TMP aren\'t specified) is "T:".\n'> < 'XThe default if HOME directory (if no HOME environment variable is set) is "S:".\n' > <'X.PP\n'> <'XTo avoid conlict with other uses, \\*E uses elvis.rc instead of .exrc or\n'> <'Xwhere it looks for macros.\n'> <'X.NH 2\n'> <'XOther Systems\n'> <'X.PP\n'> <'XFor Sun workstations, use the BSD configuration.\n'> <'XEarlier versions of elvis didn\'t link correctly due to a quirk in Sun\'s\n'> <'Xversion of the "make" utility, but this version of elvis has a work-around\n'> <'Xfor that quirk so you should have no trouble at all.\n'> <'X.PP\n'> <'XFor Linux, use the SysV settings.\n'> <'XYou can probably just remove the "-lterm" from the "LIBS= -lterm" line,\n'> <'Xsince linux keeps the termcap functions in the standard C library.\n'> <'X.PP\n'> <'XFor other UNIXoid systems, I suggest you start with the Minix-68k settings\n'> <'Xand then grow from that.\n'> <'XMinix is a nice starting point because it is a clone of Version 7 UNIX,\n'> <'Xwhich was the last common ancestor of BSD UNIX and SysV UNIX.\n'> <'XAny Operating System which claims any UNIX compatibility what so ever\n'> <'Xwill therefore support V7/Minix code.\n'> <'XYou may need to fiddle with #include directives or something, though.\n'> <'XMinix-68k is a better starting point than Minix-PC because the PC compiler\n'> <'Xhas some severe quirks.\n'> ] ) ) ] do_fork: T ) (C {<echo>} {<x>} {<->} {<visual.ms>}) (command.Simple words: [{<sed>} {(SQ <'/^X/s///'>)}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<visual.ms>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {(SQ <'/'>)} here_end_span_id: 3665 stdin_parts: [ <'X.Go 2 "VISUAL MODE COMMANDS"\n'> <'X.PP\n'> <'XMost visual mode commands are one keystroke long.\n'> <'XThe following table lists the operation performed by each keystroke,\n'> <'Xand also denotes any options or arguments that it accepts.\n'> <'XNotes at the end of the table describe the notation used in this table.\n'> <'X.PP\n'> <'XIn addition to the keys listed here, your keyboard\'s "arrow" keys\n'> <'Xwill be interpretted as the appropriate cursor movement commands.\n'> <'XThe same goes for <PgUp> and <PgDn>, if your keyboard has them.\n'> <'XThe <Insert> key will toggle between insert mode and replace mode.\n'> <'XThere is a colon mode command (":map", to be described later)\n'> <'Xwhich will allow you to define other keys, such as function keys.\n'> <'X.PP\n'> <'XA tip: visual command mode looks a lot like text input mode.\n'> <'XIf you forget which mode you\'re in, just hit the <Esc> key.\n'> <'XIf \\*E beeps, then you\'re in visual command mode.\n'> <'XIf \\*E does not beep, then you were in input mode,\n'> <'Xbut by hitting <Esc> you will have switched to visual command mode.\n'> <'XSo, one way or another, after <Esc> \\*E will be ready for a command.\n'> <'X.LD\n'> <'X.ta 0.7i 1.3i\n'> <'X\\s+2COMMAND\tDESCRIPTION\\s-2\n'> <'X\t^A\tSearch for next occurence of word at cursor (MOVE)(EXT)\n'> <'X\t^B\tMove toward the top of the file by 1 screenful\n'> <'X\t^C\t--- (usually sends SIGINT, to interupt a command)\n'> <'Xcount\t^D\tScroll down <count> lines (default 1/2 screen)\n'> <'Xcount\t^E\tScroll up <count> lines\n'> <'X\t^F\tMove toward the bottom of the file by 1 screenful\n'> <'X\t^G\tShow file status, and the current line #\n'> <'Xcount\t^H\tMove left, like h (MOVE)\n'> <'X\t^I\t---\n'> <'Xcount\t^J\tMove down (MOVE)\n'> <'X\t^K\t---\n'> <'X\t^L\tRedraw the screen\n'> <'Xcount\t^M\tMove to the front of the next line (MOVE)\n'> <'Xcount\t^N\tMove down (MOVE)\n'> <'X\t^O\t---\n'> <'Xcount\t^P\tMove up (MOVE)\n'> <'X\t^Q\t--- (typically XON, which restarts screen updates)\n'> <'X\t^R\tRedraw the screen\n'> <'X\t^S\t--- (typically XOFF, which stops screen updates)\n'> <'X\t^T\t---\n'> <'Xcount\t^U\tScroll up <count> lines (default 1/2 screen)\n'> <'X\t^V\t---\n'> <'X\t^W\t---\n'> <'Xcount\t^X\tMove to a physical column number on the screen (MOVE) (EXT)\n'> <'Xcount\t^Y\tScroll down <count> lines\n'> <'X\t^Z\t--- (sometimes sends SIGSUSP, to suspend execution)\n'> <'X\tESC\t---\n'> <'X\t^\\\\\t--- (usually sends SIGQUIT, which is ignored)\n'> <'X\t^]\tIf the cursor is on a tag name, go to that tag\n'> <'X\t^^\tSwitch to the previous file, like ":e #"\n'> <'X\t^_\t---\n'> <'Xcount\tSPC\tMove right,like l (MOVE)\n'> <'X\t! \\s-2mv\\s+2\tRun the selected lines thru an external filter program\n'> <'X\t" \\s-2key\\s+2\tSelect which cut buffer to use next\n'> <'Xcount\t# \\s-2+\\s+2\tIncrement a number (EDIT) (EXT)\n'> <'X\t$\tMove to the rear of the current line (MOVE)\n'> <'Xcount\t%\tMove to matching (){}[] or to a given % of file (MOVE) (EXT)\n'> <'Xcount\t&\tRepeat the previous ":s//" command here (EDIT)\n'> <'X\t\' \\s-2key\\s+2\tMove to a marked line (MOVE)\n'> <'Xcount\t(\tMove backward <count> sentences (MOVE)\n'> <'Xcount\t)\tMove forward <count> sentences (MOVE)\n'> <'X\t*\tGo to the next error in the errlist (EXT)\n'> <'Xcount\t+\tMove to the front of the next line (MOVE)\n'> <'Xcount\t,\tRepeat the previous [fFtT] but in the other direction (MOVE)\n'> <'Xcount\t-\tMove to the front of the preceding line (MOVE)\n'> <'Xcount\t.\tRepeat the previous "edit" command\n'> <'X\t/ \\s-2text\\s+2\tSearch forward for a given regular expression (MOVE)\n'> <'X\t0\tIf not part of count, move to 1st char of this line (MOVE)\n'> <'X\t1\tPart of count\n'> <'X\t2\tPart of count\n'> <'X\t3\tPart of count\n'> <'X\t4\tPart of count\n'> <'X\t5\tPart of count\n'> <'X\t6\tPart of count\n'> <'X\t7\tPart of count\n'> <'X\t8\tPart of count\n'> <'X\t9\tPart of count\n'> <'X\t: \\s-2text\\s+2\tRun single EX cmd\n'> <'Xcount\t;\tRepeat the previous [fFtT] cmd (MOVE)\n'> <'X\t< \\s-2mv\\s+2\tShift text left (EDIT)\n'> <'X\t= \\s-2mv\\s+2\tReformat\n'> <'X\t> \\s-2mv\\s+2\tShift text right (EDIT)\n'> <'X\t? \\s-2text\\s+2\tSearch backward for a given regular expression (MOVE)\n'> <'X\t@ \\s-2key\\s+2\tExecute the contents of a cut-buffer as VI commands\n'> <'Xcount\tA \\s-2inp\\s+2\tAppend at end of the line (EDIT)\n'> <'Xcount\tB\tMove back Word (MOVE)\n'> < 'X\tC \\s-2inp\\s+2\tChange text from the cursor through the end of the line (EDIT)\n' > <'X\tD\tDelete text from the cursor through the end of the line (EDIT)\n'> <'Xcount\tE\tMove end of Word (MOVE)\n'> <'Xcount\tF \\s-2key\\s+2\tMove leftward to a given character (MOVE)\n'> <'Xcount\tG\tMove to line #<count> (default is the bottom line) (MOVE)\n'> <'Xcount\tH\tMove to home row (the line at the top of the screen)\n'> < 'Xcount\tI \\s-2inp\\s+2\tInsert at the front of the line (after indents) (EDIT)\n' > <'Xcount\tJ\tJoin lines, to form one big line (EDIT)\n'> <'X\tK\tLook up keyword (EXT)\n'> <'Xcount\tL\tMove to last row (the line at the bottom of the screen)\n'> <'X\tM\tMove to middle row\n'> <'X\tN\tRepeat previous search, but in the opposite direction (MOVE)\n'> <'Xcount\tO \\s-2inp\\s+2\tOpen up a new line above the current line (EDIT)\n'> <'X\tP\tPaste text before the cursor (EDIT)\n'> <'X\tQ\tQuit to EX mode\n'> <'X\tR \\s-2inp\\s+2\tOvertype (EDIT)\n'> <'Xcount\tS \\s-2inp\\s+2\tChange lines, like <count>cc\n'> <'Xcount\tT \\s-2key\\s+2\tMove leftward *almost* to a given character (MOVE)\n'> <'X\tU\tUndo all recent changes to the current line\n'> <'X\tV\tStart marking lines for c/d/y/</>/!/\\\\ (EXT)\n'> <'Xcount\tW\tMove forward <count> Words (MOVE)\n'> <'Xcount\tX\tDelete the character(s) to the left of the cursor (EDIT)\n'> <'Xcount\tY\tYank text line(s) (copy them into a cut buffer)\n'> <'X\tZ Z\tSave the file & exit\n'> <'X\t[ [\tMove back 1 section (MOVE)\n'> <'X\t\\\\ \\s-2mv\\s+2\tPop-up menu for modifying text (EXT)\n'> <'X\t] ]\tMove forward 1 section (MOVE)\n'> <'X\t^\tMove to the front of the current line (after indent) (MOVE)\n'> <'Xcount\t_\tMove to the current line\n'> <'X\t` \\s-2key\\s+2\tMove to a marked character (MOVE)\n'> <'Xcount\ta \\s-2inp\\s+2\tInsert text after the cursor (EDIT)\n'> <'Xcount\tb\tMove back <count> words (MOVE)\n'> <'X\tc \\s-2mv\\s+2\tChange text (EDIT)\n'> <'X\td \\s-2mv\\s+2\tDelete text (EDIT)\n'> <'Xcount\te\tMove forward to the end of the current word (MOVE)\n'> <'Xcount\tf \\s-2key\\s+2\tMove rightward to a given character (MOVE)\n'> <'X\tg\t---\n'> <'Xcount\th\tMove left (MOVE)\n'> <'Xcount\ti \\s-2inp\\s+2\tInsert text at the cursor (EDIT)\n'> <'Xcount\tj\tMove down (MOVE)\n'> <'Xcount\tk\tMove up (MOVE)\n'> <'Xcount\tl\tMove right (MOVE)\n'> <'X\tm \\s-2key\\s+2\tMark a line or character\n'> <'X\tn\tRepeat the previous search (MOVE)\n'> <'Xcount\to \\s-2inp\\s+2\tOpen a new line below the current line (EDIT)\n'> <'X\tp\tPaste text after the cursor (EDIT)\n'> <'X\tq\t---\n'> <'Xcount\tr \\s-2key\\s+2\tReplace <count> chars by a given character (EDIT)\n'> <'Xcount\ts \\s-2inp\\s+2\tReplace <count> chars with text from the user (EDIT)\n'> <'Xcount\tt \\s-2key\\s+2\tMove rightward *almost* to a given character (MOVE)\n'> <'X\tu\tUndo the previous edit command\n'> <'X\tv\tStart marking characters for c/d/y/</>/!/\\\\ (EXT)\n'> <'Xcount\tw\tMove forward <count> words (MOVE)\n'> <'Xcount\tx\tDelete the character that the cursor\'s on (EDIT)\n'> <'X\ty \\s-2mv\\s+2\tYank text (copy it into a cut buffer)\n'> < 'X\tz \\s-2key\\s+2\tScroll current line to the screen\'s +=top -=bottom .=middle\n' > <'Xcount\t{\tMove back <count> paragraphs (MOVE)\n'> <'Xcount\t|\tMove to column <count> (the leftmost column is 1)\n'> <'Xcount\t}\tMove forward <count> paragraphs (MOVE)\n'> <'Xcount\t~\tSwitch a character between uppercase & lowercase (EDIT)\n'> <'X\tDEL\t--- (usually mapped to shift-X, so it deletes one character)\n'> <'X.DE\n'> <'X.IP count\n'> <'XMany commands may be preceded by a count. This is a sequence of digits\n'> <'Xrepresenting a decimal number. For most commands that use a count,\n'> <'Xthe command is repeated <count> times. The count is always optional,\n'> <'Xand usually defaults to 1.\n'> <'X.IP key\n'> <'XSome commands require two keystrokes. The first key always determines\n'> <'Xwhich command is to be executed. The second key is used as a parameter\n'> <'Xto the command.\n'> <'X.IP mv\n'> < 'XSome commands (! < > c d y \\\\ =) operate on text between the cursor and some\n' > <'Xother position.\n'> <'XThere are three ways that you can specifify that other position.\n'> <'X.IP\n'> <'XThe first way is to follow the command keystroke with a movement command.\n'> <'XFor example, "dw" deletes a single word.\n'> <'X"d3w" and "3dw" both delete three words.\n'> <'X.IP\n'> <'XThe second way is to type the command keystroke twice.\n'> <'XThis causes whole lines to be acted upon.\n'> <'XFor example, ">>" indents the current line.\n'> <'X"3>>" indents the current line and the following two lines.\n'> <'X.IP\n'> <'XThe last way is to move the cursor to one end of the text,\n'> <'Xtype \'v\' or \'V\' to start marking,\n'> <'Xmove the cursor to the other end,\n'> <'Xand then type the desired command key.\n'> <'X.IP inp\n'> <'XMany commands allow the user to interactively enter text.\n'> <'XSee the discussion of "input mode" in the following section.\n'> <'X.IP (EXT)\n'> <'XThese commands are extensions -- the real vi doesn\'t have them.\n'> <'X.IP (EDIT)\n'> <'XThese commands affect text, and may be repeated by the "." command.\n'> <'X.IP (MOVE)\n'> <'XThese commands move the cursor, and may be used to specify the extent\n'> <'Xof a member of the "mv" class of commands.\n'> <'X.NH 2\n'> <'XInput Mode\n'> <'X.PP\n'> <'XYou can\'t type text into your file directly from visual command mode.\n'> <'XInstead, you must first give a command which will put you into input mode.\n'> <'XThe commands to do this are A/C/I/O/R/S/a/i/o/s.\n'> <'X.PP\n'> <'XThe S/s/C/c commands temporarily place a $ at the end of the text that\n'> <'Xthey are going to change.\n'> <'X.PP\n'> <'XIn input mode, all keystrokes are inserted into the text at the\n'> <'Xcursor\'s position, except for the following:\n'> <'X.ID\n'> <'X^A\tinsert a copy of the last input text\n'> <'X^D\tdelete one indent character\n'> <'X^H\t(backspace) erase the character before the cursor\n'> <'X^L\tredraw the screen\n'> <'X^M\t(carriage return) insert a newline (^J, linefeed)\n'> <'X^O\texecute next key as a visual command (limited!)\n'> <'X^P\tinsert the contents of the cut buffer\n'> <'X^R\tredraw the screen, like ^L\n'> <'X^T\tinsert an indent character\n'> <'X^U\tbackspace to the beginning of the line\n'> <'X^V\tinsert the following keystroke, even if special\n'> <'X^W\tbackspace to the beginning of the current word\n'> <'X^Z^Z\twrite the file & exit \\*E\n'> <'X^[\t(ESCape) exit from input mode, back to command mode\n'> <'X.DE\n'> <'X.PP\n'> <'XAlso, on some systems, ^S may stop output, ^Q may restart output,\n'> <'Xand ^C may interupt execution.\n'> <'X^@ (the NUL character) cannot be inserted.\n'> <'X.PP\n'> <'XThe R visual command puts you in overtype mode,\n'> <'Xwhich is a slightly different form of input mode.\n'> <'XIn overtype mode, each time you insert a character,\n'> <'Xone of the old characters is deleted from the file.\n'> <'X.NH 2\n'> <'XArrow keys in Input Mode\n'> <'X.PP\n'> <'XThe arrow keys can be used to move the cursor in input mode.\n'> < 'X(This is an extension; the real Vi doesn\'t support arrow keys in input mode.)\n' > <'XThe <PgUp>, <PgDn>, <Home>, and <End> keys work in input mode, too.\n'> <'XThe <Delete> key deletes a single character in input mode.\n'> <'XThe <Insert> key toggles between input mode and replace mode.\n'> <'X.PP\n'> <'XThe best thing about allowing arrow keys to work in input mode is that\n'> <'Xas long as you\'re in input mode,\n'> <'X\\*E seems to have a fairly ordinary user interface.\n'> <'XWith most other text editors, you are always in either insert mode or\n'> <'Xreplace mode, and you can use the arrow keys at any time to move the cursor.\n'> <'XNow, \\*E can act like that, too.\n'> <'XIn fact, with the new "inputmode" option and the "control-Z control-Z" input\n'> <'Xcommand, you may never have to go into visual command mode for simple edit\n'> <'Xsessions.\n'> <'X.NH 2\n'> <'XDigraphs\n'> <'X.PP\n'> <'X\\*E supports digraphs as a way to enter non-ASCII characters.\n'> <'XA digraph is a character which is composed of two other characters.\n'> <'XFor example, an apostrophe and the letter i could be defined as a digraph\n'> <'Xwhich is to be stored & displayed as an accented i.\n'> <'X.PP\n'> <'XThere is no single standard for extended ASCII character sets.\n'> <'X\\*E can be compiled to fill the digraph with values appropriate for\n'> <'Xeither the IBM PC character set, or the LATIN-1 character set used by\n'> <'XX windows, or neither.\n'> <'X(See the discussions of -DCS_IBMPC and -DCS_LATIN1 in the CFLAGS section\n'> <'Xof this manual.)\n'> <'XYou can view or edit the digraph table via the ":digraph" colon command.\n'> <'X.PP\n'> <'XDigraphs will not be recognized until you\'ve entered ":set digraph".\n'> <'X.PP\n'> <'XTo actually use a digraph\n'> <'Xtype the first character, then hit <Backspace>, and then type the\n'> <'Xsecond character.\n'> <'X\\*E will then substitute the non-ASCII character in their place.\n'> <'X.NH 2\n'> <'XAbbreviations\n'> <'X.PP\n'> <'X\\*E can expand abbreviations for you.\n'> <'XYou define an abbreviation with the :abbr command,\n'> <'Xand then whenever you type in the abbreviated form while in input mode,\n'> <'X\\*E will immediately replace it with the long form.\n'> <'XCOBOL programmers should find this useful. :-)\n'> <'X.PP\n'> <'X\\*E doesn\'t perform the substitution until you type a non-alphanumeric\n'> <'Xcharacter to mark the end of the word.\n'> <'XIf you type a control-V before that non-alphanumeric character, then\n'> <'X\\*E will not perform the substitution.\n'> <'X.NH 2\n'> <'XAuto-Indent\n'> <'X.PP\n'> <'XWith the ":set autoindent" option turned on,\n'> <'X\\*E will automatically insert leading whitespace at the beginning of each\n'> <'Xnew line that you type in.\n'> <'XThe leading whitespace is copied from the preceding line.\n'> <'X.PP\n'> <'XTo add more leading whitespace, type control-T.\n'> <'XTo remove some whitespace, type control-D.\n'> <'X.PP\n'> <'XIf you ":set noautotab", then the whitespace generated by control-T will\n'> <'Xalways consist of spaces -- never tabs.\n'> <'XSome people seem to prefer this.\n'> <'X.PP\n'> <'X\\*E\' autoindent mode isn\'t 100% compatible with vi\'s.\n'> <'XIn \\*E, 0^D and ^^D don\'t work,\n'> <'X^U can wipeout all indentation, \n'> <'Xand sometimes \\*E will use a different amount of indentation than vi would.\n'> ] ) ) ] do_fork: T ) ] )