📄 jove.1
字号:
Rubout deletes the character \fIbefore\fP the cursor (not the one that thecursor is on top of or under; that is the character \fIafter\fP thecursor).The cursor and all characters after it move backwards.Therefore,if you typing a printing character and then type Rubout,they cancel out..LPTo end a line and start typing a new one,type Return.Return operates by inserting a \fIline-separator\fP,so if you type Return inthe middle of a line,you break the line in two.Because a line-separator is just a single character,you can type Rubout at thebeginning of a line to delete the line-separator and join it with thepreceding line..LPAs a special case, if you type Return at the end of a line and there aretwo or more empty lines just below it, \s-2JOVE\s0 does not insert aline-separator but instead merely moves to the next (empty) line. Thisbehavior is convenient when you want to add several lines of text in themiddle of a buffer. You can use the Control-O (\fInewline-and-backup\fP)command to "open" several empty lines at once; then you can insert the newtext, filling up these empty lines. The advantage is that \s-2JOVE\s0 doesnot have to redraw the bottom part of the screen for each Return you type,as it would ordinarily. That "redisplay" can be both slow and distracting..LPIf you add too many characters to one line,without breaking it with Return,the line will grow too long to display on one screen line.When this happens,\s-2JOVE\s0 puts an "!" at the extreme right margin,and doesn't bother to display the rest of the line unless thecursor happens to be in it.The "!" is not part of your text;conversely,even though you can't see the rest of your line,it's still there,and if you break the line,the "!" will go away..LPDirect insertion works for printing characters and space,but othercharacters act as editing commands and do not insert themselves.If you need to insert a control character,Escape,or Rubout,you must first \fIquote\fP it by typing the Control-Q command first..NH 2Moving the Cursor.XS \n(PN 5n\*(SN Moving the Cursor.XE.LPTo do more than insert characters,you have to know how to move the cursor.Here are a few of the commands for doing that..IP "C-A" 15nMove to the beginning of the line..IP "C-E" 15nMove to the end of the line..IP "C-F" 15nMove forward over one character..IP "C-B" 15nMove backward over one character..IP "C-N" 15nMove down one line,vertically.If you start in the middle of one line,you end in the middle of the next..IP "C-P" 15nMove up one line,vertically..IP "ESC <" 15nMove to the beginning of the entire buffer..IP "ESC >" 15nMove to the end of the entire buffer..IP "ESC ," 15nMove to the beginning of the visible window..IP "ESC ." 15nMove to the end of the visible window..NH 2Erasing Text.XS \n(PN 5n\*(SN Erasing Text.XE.LP.IP "Rubout" 15nDelete the character before the cursor..IP "C-D" 15nDelete the character after the cursor..IP "C-K" 15nKill to the end of the line..LPYou already know about the Rubout command which deletes the characterbefore the cursor.Another command,Control-D,deletes the characterafter the cursor,causing the rest of the text on the line to shift left.If Control-D is typed at the end of a line,that line and the next line are joined together..LPTo erase a larger amount of text,use the Control-K command,which kills a line at a time.If Control-K is done at the beginning ormiddle of a line,it kills all the text up to the end of the line.If Control-K is done at the end of a line,it joins that line and the next line.If Control-K is done twice, it kills the rest of the line and the lineseparator also..NH 2Files \(em Saving Your Work.XS \n(PN 5n\*(SN Files \(em Saving Your Work.XE.LPThe commands above are sufficient for creating text in the \s-2JOVE\s0 buffer.The more advanced \s-2JOVE\s0 commands just make things easier.But to keep any text permanently you must put it in a \fIfile\fP.Files are the objects which.UXuses for storing data for a length of time.To tell \s-2JOVE\s0 to read text into a file,choose a filename,such as \fIfoo.bar\fP,and type C-X C-R \fIfoo.bar\fP<return>.This reads the file \fIfoo.bar\fP so that its contents appear on the screenfor editing.You can make changes,and then save the file by typing C-X C-S (save-file).This makes the changes permanent and actually changes the file \fIfoo.bar\fP.Until then,the changes are only inside \s-2JOVE\s0,and the file \fIfoo.bar\fP is not really changed.If the file \fIfoo.bar\fP doesn't exist,and you want to create it,read it as if it did exist.When you save your text with C-X C-S the file will be created..NH 2Exiting and Pausing \(em Leaving \s-2JOVE\s0.XS \n(PN 5n\*(SN Exiting and Pausing \(em Leaving \s-2JOVE\s0.XE.LPThe command C-X C-C (\fIexit-jove\fP) will terminate the \s-2JOVE\s0session and return to the shell. If there are modified but unsaved buffers, \s-2JOVE\s0 will ask you for confirmation, and youcan abort the command, look at what buffers aremodified but unsaved using C-X C-B (\fIlist-buffers\fP), save the valuable ones, and then exit. If what you want to do, on the other hand,is \fIpreserve\fP the editing session but return to the shell temporarilyyou can (under Berkeley .UXonly) issue the command ESC S (\fIpause-jove\fP), do your .UX work within the c-shell, then return to \s-2JOVE\s0 using the \fIfg\fP command to resume editing at the point where you paused.For this sort of situation you might consider using an \fIinteractiveshell\fP (that is, a shell in a \s-2JOVE\s0 window) which lets you useeditor commands to manipulate your .UX commands (and their output) while never leaving the editor.(The interactive shell feature is described below.).NH 2Giving Numeric Arguments to \s-2JOVE\s0 Commands.XS \n(PN 5n\*(SN Giving Numeric Arguments to \s-2JOVE\s0 Commands.XE.LPAny \s-2JOVE\s0 command can be given a \fInumeric argument\fP.Some commands interpret the argument as a repetition count.For example,giving an argument of ten to the C-F command (forward-character) moves forwardten characters.With these commands,no argument is equivalent to an argument of 1..LPSome commands use the value of the argument,but do something peculiar (or nothing) when there is no argument.For example,ESC G (\fIgoto-line\fP) with an argument \fBn\fPgoes to the beginning of the \fBn\fP'th line.But ESC G with no argument doesn't do anything.Similarly, C-K with an argument kills that many lines, including their lineseparators. Without an argument, C-K when there is text on the line to theright ofthe cursor kills that text; when there is no text after the cursor, C-Kdeletes the line separator..LPThe fundamental way of specifying an argument is to use ESC followedby the digits of the argument, for example, ESC 123 ESC G to go to line123. Negative arguments are allowed,although not all of the commands know what to do with one..LPTyping C-U means do the next command four times.Two such C-U's multiply the next command by sixteen.Thus,C-U C-U C-F moves forward sixteen characters.This is a good way to move forward quickly,since it moves about 1/4 of a line on most terminals.Other useful combinations are:C-U C-U C-N (move down a good fraction of the screen),C-U C-U C-O (make "a lot" of blank lines),and C-U C-K (kill four lines \(em note that typing C-K four timeswould kill 2 lines)..LPThere are other,terminal-dependent ways of specifying arguments.They have the same effect but may be easier to type.If your terminalhas a numeric keypad which sends something recognizably different fromthe ordinary digits,it is possible to program \s-2JOVE\s0 to to allow use ofthe numeric keypad for specifying arguments..NH 2The Mark and the Region.XS \n(PN 5n\*(SN The Mark and the Region.XE.LPIn general,a command that processes an arbitrary part of the buffermust know where to start and where to stop.In \s-2JOVE\s0,such commands usually operate on the text between point and \fIthe mark\fP.This body of text is called \fIthe region\fP.To specify a region,you set point to one end of it and mark at the other.It doesn't matter which one comes earlier in the text..IP "C-@" 15nSet the mark where point is..IP "C-X C-X" 15nInterchange mark and point..LPFor example,if you wish to convert part of the buffer to all upper-case,you can use the C-X C-U command,which operates on the text in the region.You can first go to the beginning of the text to be capitalized,put the mark there, move to the end, and then type C-X C-U.Or,you can set the mark at the end of the text,move to the beginning,and then type C-X C-U.C-X C-U runs the command \fIcase-region-upper\fP,whose name signifies that the region,or everything between point and mark,is to be capitalized..LPThe way to set the mark is with the C-@ command or (on someterminals) the C-Space command.They set the mark where point is.Then you can move point away,leaving mark behind. When the mark is set, "[Point pushed]" is printed onthe message line..LPSince terminals have only one cursor,there is no way for \s-2JOVE\s0 to show you where the mark is located.You have to remember.The usual solution to this problem is to set the mark and then use it soon,before you forget where it is.But you can see where the mark is withthe command C-X C-X which puts the mark where point was and pointwhere mark was.The extent of the region is unchanged,but the cursor and point are now at the previous location of the mark..NH 2The Ring of Marks.XS \n(PN 5n\*(SN The Ring of Marks.XE.LPAside from delimiting the region,the mark is also useful for remembering a spot that you may want to go back to.To make this feature more useful,\s-2JOVE\s0 remembers 16 previous locations of the mark.Most commands that set the mark push the old mark onto this stack.To return to a marked location, use C-U C-@.This moves point to where the mark was,and restores the mark from the stack of former marks.So repeated use of this command moves point to all of the oldmarks on the stack,one by one.Since the stack is actually a ring,enough uses of C-U C-@ bring point back to where it was originally..LPSome commands whose primary purpose is to move point a great distancetake advantage of the stack of marks to give you a way to undo thecommand.The best example is ESC <,which moves to the beginning of the buffer.If there are more than 22 lines between the beginning ofthe buffer and point,ESC < sets the mark first,so that you can use C-U C-@ or C-X C-X to go back to where you were.You can change the number of lines from 22 since it is kept in the variable \fImark-threshold\fP.By setting it to 0,you can make these commands always set the mark.By setting it to a very large number you can prevent these commands from eversetting the mark.If a command decides to set the mark,it prints the message \fI[Point pushed]\fP..NH 2Killing and Moving Text.XS \n(PN 5n\*(SN Killing and Moving Text.XE.LPThe most common way of moving or copying text with \s-2JOVE\s0 is to kill it,and get it back again in one or more places.This is very safebecause the last several pieces of killed text are all remembered,and it is versatile,because the many commands for killing syntactic unitscan also be used for moving those units.There are also other ways of moving text for special purposes..NH 2Deletion and Killing.XS \n(PN 5n\*(SN Deletion and Killing.XE.LPMost commands which erase text from the buffer save it so that you canget it back if you change your mind,or move or copy it to other parts of the buffer.These commands are known as \fIkill\fP commands.The rest of the commands that erase text do not save it;they are known as \fIdelete\fP commands.The delete commands include C-D and Rubout,which delete only one character at a time,and those commands that delete only spaces or line separators.Commands that can destroy significant amounts of nontrivial data generally kill.A command'sname and description will use the words \fIkill\fP or \fIdelete\fP tosay which one it does..IP "C-D" 20nDelete next character..IP "Rubout" 20nDelete previous character..IP "ESC \\\\\\\\" 20nDelete spaces and tabs around point..IP "C-X C-O" 20nDelete blank lines around the current line..IP "C-K" 20nKill rest of line or one or more lines..IP "C-W" 20nKill region (from point to the mark)..IP "ESC D" 20nKill word..IP "ESC Rubout" 20nKill word backwards..IP "ESC K" 20nKill to end of sentence..IP "C-X Rubout" 20nKill to beginning of sentence..NH 2Deletion.XS \n(PN 5n\*(SN Deletion.XE.LPThe most basic delete commands are C-D and Rubout.C-D deletes the character after the cursor,the one the cursor is "on top of" or "underneath".The cursor doesn't move.Rubout deletes the character before the cursor,and moves the cursor back.Line separators act like normal characters when deleted.Actually,C-D and Rubout aren't always \fIdelete\fP commands;if you give an argument,they \fIkill\fP instead.This prevents you from losing a great deal of text by typing a largeargument to a C-D or Rubout..LPThe other delete commands are those which delete only formattingcharacters:spaces,tabs,and line separators.ESC \\ (\fIdelete-white-space\fP)deletes all the spaces and tab characters before and after point.C-X C-O (\fIdelete-blank-lines\fP) deletes all blank lines after the current line,and if the current line is blank deletes all the blanklines preceding the current line as well(leaving one blank line, the current line)..NH 2Killing by Lines.XS \n(PN 5n\*(SN Killing by Lines.XE
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -