📄 jove.1
字号:
.LPThe simplest kill command is the C-K command.If issued at the beginning of a line,it kills all the text on the line,leaving it blank.If given on a line containing only white space (blanks and tabs)the line disappears.As a consequence,if you go to the front of a non-blank line and type two C-K's,the line disappears completely..LPMore generally,C-K kills from point up to the end of the line,unless it is at the end of a line.In that case,it kills the line separator following the line,thus merging the next line into the current one.Invisible spaces and tabs at the end of the line are ignored whendeciding which case applies,so if point appears to be at the end of the line,you can be sure the line separator will be killed..LPC-K with an argument of zero kills all the text beforepoint on the current line..NH 2Other Kill Commands.XS \n(PN 5n\*(SN Other Kill Commands.XE.LPA kill command which is very general is C-W (\fIkill-region\fP),which kills everything between point and the mark.*.FS*Often users switch this binding from C-W to C-X C-K because it is tooeasy to hit C-W accidentally..FEWith this command,you can kill and save contiguous characters,if you first set the mark at one end of them and go to the other end..LPOther syntactic units can be killed, too;words,with ESC Rubout and ESC D;and, sentences,with ESC K and C-X Rubout..NH 2Un-killing.XS \n(PN 5n\*(SN Un-killing (Yanking).XE.LPUn-killing (yanking) is getting back text which was killed.The usual way tomove or copy text is to kill it and then un-kill it one or more times..IP "C-Y" 10nYank (re-insert) last killed text..IP "ESC Y" 10nReplace re-inserted killed text with the previously killed text..IP "ESC W" 10nSave region as last killed text without killing..LPKilled text is pushed onto a \fIring buffer\fP called the \fIkillring\fP that remembers the last 10 blocks of text that were killed.(Why it is called a ring buffer will be explained below).The command C-Y (\fIyank\fP) reinserts the text of the most recent kill.It leaves the cursor at the end of the text,and puts the mark at the beginning.Thus,a single C-Y undoes the C-W..LPIf you wish to copy a block of text,you might want to use ESC W (\fIcopy-region\fP),which copies the region into the kill ring without removing it from the buffer.This is approximately equivalent to C-W followed by C-Y,except that ESC W does not mark the buffer as"changed" and does not cause the screen to be rewritten..LPThere is only one kill ring shared among all the buffers.After visiting a new file,whatever was last killed in the previous file is still on top of the kill ring.This is important for moving text between files..NH 2Appending Kills.XS \n(PN 5n\*(SN Appending Kills.XE.LPNormally,each kill command pushes a new block onto the kill ring.However,two or more kill commands immediately in a row (without any otherintervening commands) combine their text into asingle entry on the ring,so that a single C-Y command gets it all back as it was before it was killed.This means that you don't have to kill all the text in one command;you can keep killing line after line,or word after word,until you have killed it all,and you can still get it all back at once..LPCommands that kill forward from .I point add onto the end of the previouskilled text.Commands that kill backward from .I pointadd onto the beginning.This way,any sequence of mixed forward and backward killcommands puts all the killed text into one entry without needing rearrangement..NH 2Un-killing Earlier Kills.XS \n(PN 5n\*(SN Un-killing Earlier Kills.XE.LPTo recover killed text that is no longer the most recent kill,you need the ESC Y (\fIyank-pop\fP) command.The ESC Y command can be usedonly after a C-Y (yank) command or another ESC Y.It takes the un-killedtext inserted by the C-Y and replaces it with the text from an earlierkill.So,to recover the text of the next-to-the-last kill,you first use C-Y to recover the last kill,and then discard it by use of ESC Y to move back to the previous kill..LPYou can think of all the last few kills as living on a ring.After a C-Y command,the text at the front of the ring is also present in the buffer.ESC Y "rotates" the ring bringing the previous string of text to the frontand this text replaces the other text in the buffer as well.Enough ESC Y commands can rotate any part of the ring to the front,so you can get at any killed text so long as it is recent enoughto be still in the ring.Eventually the ring rotates all the wayaround and the most recently killed text comes to the front(and into the buffer) again.ESC Y with a negative argument rotates the ring backwards..LPWhen the text you are looking for is brought into the buffer,you can stop doing ESC Y's and the text will stay there.It's really just a copy of what's at the front of the ring,so editing it does not change what's in the ring.And the ring,once rotated,stays rotated,so that doing another C-Y gets another copy of what you rotated to thefront with ESC Y..LPIf you change yourmind about un-killing,C-W gets rid of the un-killed text, evenafter any number of ESC Y's..NH 1Searching.XS \n(PN\*(SN Searching.XE.LPThe search commands are useful for finding and moving to arbitrarypositions in the buffer in one swift motion.For example,if you just ran the spell program on a paperand you want to correct some word,you can use the search commands to move directly to that word. There aretwo flavors of search: \fIstring search\fP and \fIincremental search\fP.The former is the default flavor\(emif you want to use incremental searchyou must rearrange the key bindings (see below)..NH 2Conventional Search.XS \n(PN 5n\*(SN Conventional Search.XE.LP.IP "C-S" 15nSearch forward..IP "C-R" 15nSearch backward..LPTo search for the string "FOO" you type "C-S FOO<return>".If \s-2JOVE\s0 findsFOO it moves point to the end of it; otherwise \s-2JOVE\s0 prints an errormessage and leaves point unchanged.C-S searches forward from pointso only occurrences of FOO after point are found.To search in the other direction use C-R.It is exactly the same as C-S except it searches in the opposite direction,and if it finds the string,it leaves point at the beginning of it,not at the end as in C-S..LPWhile \s-2JOVE\s0 is searching it prints the search string on the message line.This is so you know what \s-2JOVE\s0 is doing.When the system is heavily loaded andediting in exceptionally large buffers,searches can take several (sometimes many) seconds..LP\s-2JOVE\s0 remembers the last search string you used,so if you want to search for the same string you can type "C-S <return>".If you mistyped the last search string,you can type C-S followed by C-R.C-R,as usual,inserts the default search string into the minibuffer,and then you can fix it up..NH 2Incremental Search.XS \n(PN 5n\*(SN Incremental Search.XE.LPThis search command is unusual in that is is \fIincremental\fP;it begins to search before you have typed the complete search string.As you type in the search string,\s-2JOVE\s0 shows you where it would be found.When you have typed enough characters to identify the place you want,you can stop.Depending on what you will do next,you may or may not need to terminate the search explicitly with a Return first..LPThe command to search is C-S (\fIi-search-forward\fP).C-S reads in characters and positions the cursor at the firstoccurrence of the characters that you have typed so far.If you type C-S and then F,the cursor moves in the text just after the next "F".Type an "O",and see the cursor move to after the next "FO".After another "O",the cursor is after the next "FOO".At the same time,the "FOO" has echoed on the message line..LPIf you type a mistaken character,you can rub it out.After the FOO,typing a Rubout makes the "O" disappear from the message line,leaving only "FO".The cursor moves back in the buffer to the "FO".Rubbing out the "O" and "F" moves the cursor back to where youstarted the search..LPWhen you are satisfied with the place you have reached,you can type a Return,which stops searching,leaving the cursor where the search brought it.Also,any command not specially meaningful in searches stopsthe searching and is then executed.Thus,typing C-A would exit the search and then move to the beginning of the line.Return is necessary only if the next character you want to type is a printingcharacter,Rubout,Return,or another search command,since those are the characters that have special meanings inside the search..LPSometimes you search for "FOO" and find it,but not the one you hoped to find.Perhaps there is a second FOO that you forgot about,after the one you just found.Then type another C-S and the cursor will find the next FOO.This can be done any number of times.If you overshoot,you can return to previous finds by rubbing out the C-S's..LPAfter you exit a search,you can search for the same string again by typing just C-S C-S:one C-S command to start the search and thenanother C-S to mean "search again for the same string"..LPIf your string is not found at all,the message line says "Failing I-search".The cursor is after the place where \s-2JOVE\s0 found as much ofyour string as it could.Thus,if you search for FOOT and there is no FOOT,you might see the cursor after the FOO in FOOL.At this point there are several things you can do.If your string was mistyped,you can rub some of it out and correct it.If you like the place you have found,you can type Return or some other \s-2JOVE\s0 commandto "accept what the search offered".Or you can type C-G,which undoes the search altogether and positions you back where you startedthe search..LPYou can also type C-R at any time to start searching backwards.If a search fails because the place you started was too late in the file,you should do this.Repeated C-R's keep looking backward for more occurrences of the last search string.A C-S starts going forward again.C-R's can be rubbed out just like anything else..NH 2Searching with Regular Expressions.XS \n(PN 5n\*(SN Searching with Regular Expressions.XE.LPIn addition to the searching facilities described above,\s-2JOVE\s0can search for patterns using regular expressions.The handling of regular expressions in \s-2JOVE\s0 is like that of \fIed(1)\fPor \fIvi(1)\fP, but with some notable additions.The extra metacharacters understood by \s-2JOVE\s0 are \e<,\e>,\e\|| and \e\|{.The first two of these match the beginnings and endings of words;Thus the search pattern,"\|\e<Exec" would match all words beginning with the letters "Exec"..LPAn \e\|| signals the beginning of an alternative \(em that is, thepattern "foo\e\||bar" would match either "foo" or "bar". The "curlybrace" is a way of introducing several sub-alternatives into a pattern.It parallels the [] construct of regular expressions, except it specifiesa list of alternative words instead of just alternative characters. Sothe pattern "foo\e\|{bar,baz\e\|}bie" matches "foobarbie" or "foobazbie"..LP\s-2JOVE\s0 only regards metacharacters as special if the variable\fImatch-regular-expressions\fP is set to "on".The ability to have \s-2JOVE\s0 ignore these characters is useful ifyou're editing a document about patterns and regular expressions orwhen a novice is learning \s-2JOVE\s0..LPAnother variable that affects searching is \fIcase-ignore-search\fP. Ifthis variable is set to "on" then upper case and lower case letters areconsidered equal..NH 1Replacement Commands.XS \n(PN\*(SN Replacement Commands.XE.LPGlobal search-and-replace operations are not needed as often in \s-2JOVE\s0as they are in other editors,but they are available.In addition tothe simple Replace operation which is like that found in most editors,there is a Query Replace operation which asks,for each occurrence of the pattern,whether to replace it..NH 2Global replacement.XS \n(PN 5n\*(SN Global Replacement.XE.LPTo replace every occurrence of FOO after point with BAR,you can do, e.g., "ESC R FOO<return>BAR" as the \fIreplace-string\fP commandis bound to the ESC R.Replacement takes place only between point and the end of the bufferso if you want to cover the whole buffer you must go to the beginning first..NH 2Query Replace.XS \n(PN 5n\*(SN Query Replace.XE.LPIf you want to change only some of the occurrences of FOO,not all,then the global \fIreplace-string\fP is inappropriate;Instead,use, e.g., "ESC Q FOO<return>BAR", to run the command \fIquery-replace-string\fP.This displays each occurrence of FOO and waits for you to say whetherto replace it with a BAR.The things you can type when you are shown an occurrence of FOO are:.IP "Space" 15nto replace the FOO..IP "Rubout" 15nto skip to the next FOO without replacing this one..IP "Return" 15nto stop without doing any more replacements..IP "Period" 15nto replace this FOO and then stop..IP "! or P" 15nto replace all remaining FOO's without asking..IP "C-R or R" 15nto enter a recursive editing level,in case the FOO needs to be edited rather than just replaced with a BAR.When you are done,exit the recursive editing level with C-X C-C and the next FOO willbe displayed..IP "C-W" 15nto delete the FOO, and then start editing the buffer.When you are finished editing whatever is to replace the FOO,exit the recursive editing level with C-X C-Cand the next FOO will be displayed..IP "U" 15nmove to the last replacement and undo it..LPAnother alternative is using \fIreplace-in-region\fP which is just like\fIreplace-string\fP except it searches only within the region..LP
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -