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

📄 joe.1.in

📁 举世闻名的joe记事本源程序
💻 IN
📖 第 1 页 / 共 3 页
字号:
.IP \fB\e&This gets replaced by the text which matched the search string.  Forexample, if the search string was \fB\e<\e*\e>\fR, which matches words, andyou give \fB"\e&"\fR, then joe will put quote marks around words..IP \fB\e0\ -\ \e9These get replaced with the text which matched the Nth \fB\e*\fR, \fB\e?\fR,\fB\e+\fR, \fB\ec\fR, \fB\e+\fR, or \fB\e[...]\fR in the search string..IP \fB\e\eUse this if you need to put a \fB\e\fR in the replacement string..IP \fB\en  Use this if you need to put a line-break in the replacement string..PPSome examples:Suppose you have a list of addresses, each on a separate line, which starts with "Address:" and has each element separated by commas.  Like so: Address: S. Holmes, 221b Baker St., London, EnglandIf you wanted to rearrange the list, to get the country first, then the city, then the person's name, and then the address, you could do this:Type \fB^K F\fR to start the search, and type:\fBAddress:\e*,\e*,\e*,\e*\e$\fR to match "Address:", the four comma-separated elements, and then the end of the line.  When asked for options, you would type \fBr\fR to replace the string, and then type:\fBAddress:\e3,\e2,\e0,\e1\fRTo shuffle the information the way you want it. After hitting return, the search would begin, and the sample line would be changed to: Address: England, London, S. Holmes, 221b Baker St..SS BlocksIf you want to move, copy, save or delete a specific section of text, you can do it with highlighted blocks.  First, move the cursor to the start of the section of text you want to work on, and press \fB^K B\fR.  Then move the cursor to the character just after the end of the text you want to affect and press \fB^K K\fR.  The text between the \fB^K B\fR and \fB^K K\fR should become highlighted.  Now you can move your cursor to someplace else in your document and press \fB^K M\fR to move the highlighted text there.  You can press \fB^K C\fR to make a copy of the highlighted text and insert it to where the cursor is positioned.  \fB^K Y\fR to deletes the highlighted text.  \fB^K W\fR, writes the highlighted text to a file.  A very useful command is \fB^K /\fR, which filters a block of text through aunix command.  For example, if you select a list of words with \fB^K B\fRand \fB^K K\fR, and then type \fB^K / sort\fR, the list of words will besorted.  Another useful unix command for \fB^K /\fR, is \fBtr\fR.  If youtype \fB^K / tr a-z A-Z\fR, then all of the letters in the highlighted blockwill be converted to uppercase.After you are finished with some block operations, you can just leave the highlighting on if you don't mind it (of course, if you accidently hit \fB^K Y\fR without noticing...).  If it really bothers you, however, just hit \fB^K B ^K K\fR, to turn the highlighting off.  .SS Indenting program blocksAuto-indent mode toggled with the \fB^T I\fR command.  The\fBjoerc\fR is normally set up so that files with names ending with .p, .cor .h have auto-indent mode enabled.  When auto-indent mode is enabled andyou hit \fBReturn\fR, the cursor will be placed in the same column that thefirst non-SPACE/TAB character was in on the original line.You can use the \fB^K ,\fR and \fB^K .\fR commands to shift a block of text to the left or right.  If no highlighting is set when you give these commands, the program block the cursor is located in will be selected, and will be moved by subsequent \fB^K ,\fR and \fB^K .\fR commands.  The number of columns these commands shift by can be set through a \fB^T\fR option..SS WindowsYou can edit more than one file at the same time or edit two or moredifferent places of the same file.  To do this, hit \fB^K O\fR, to split thescreen into two windows.  Use \fB^K P\fR or \fB^K N\fR to move the cursorinto the top window or the lower window.  Use \fB^K E\fR to edit a newfile in one of the windows.  A window will go away when you save the filewith \fB^K X\fR or abort the file with \fB^C\fR.  If you abort a file whichexists in two windows, one of the window goes away, not the file.You can hit \fB^K O\fR within a window to create even more windows.  If you have too many windows on the screen, but you don't want to eliminate them, you can hit \fB^K I\fR.  This will show only the window the cursor is in, or if there was only one window on the screen to begin with, try to fit all hidden windows on the screen.  If there are more windows than can fit on the screen, you can hit \fB^K N\fR on the bottom-most window or \fB^K P\fR on the top-most window to get to them.  If you gave more than one file name to JOE on the command line, each file will be placed in a different window.  You can change the height of the windows with the \fB^K G\fR and \fB^K T\fRcommands..SS Keyboard macros Macros allow you to record a series of keystrokes and replay them with the press of two keys.  This is useful to automate repetitive tasks.  To start a macro recording, hit \fB^K [\fR followed by a number from 0 to 9.  The status line will display (Macro n recording...).  Now, type in the series of keystrokes that you want to be able to repeat.  The commands you type will have their usual effect. Hit \fB^K ]\fR to stop recording the macro.  Hit \fB^K\fR followed by the number you recorded the macro in to execute one iteration of the key-strokes.   For example, if you want to put "**" in front of a number of lines, you can type:\fB^K [ ^A ** \fR<down arrow> \fB^K ]\fRWhich starts the macro recording, moves the cursor to the beginning of the line, inserts "**", moves the cursor down one line, and then ends the recording. Since we included the key-strokes needed to position the cursor on the next line, we can repeatedly use this macro without having to move the cursor ourselves, something you should always keep in mind when recording a macro.If you find that the macro you are recording itself has a repeated set ofkey-strokes in it, you can record a macro within the macro, as long as youuse a different macro number.  Also you can execute previously recordedmacros from within new macros. .SS RepeatYou can use the repeat command, \fB^K \e\fR, to repeat a macro, or any otheredit command or even a normal character, a specified number of times.  Hit\fB^K \e\fR, type in the number of times you want the command repeated andpress \fBReturn\fR.  The next edit command you now give will be repeatedthat many times.For example, to delete the next 20 lines of text, type:\fB^K \ 20\fR<return>\fB^Y\fR.SS Rectangle modeType \fB^T X\fR to have \fB^K B\fR and \fB^K K\fR select rectangular blocksinstead of stream-of-text blocks.  This mode is useful for moving, copying,deleting or saving columns of text.  You can also filter columns of textwith the \fB^K /\fR command- if you want to sort a column, for example.  Theinsert file command, \fB^K R\fR is also effected.When rectangle mode is selected, over-type mode is also useful(\fB^T T\fR).  When over-type mode is selected, rectangles will replaceexisting text instead of getting inserted before it.  Also the delete blockcommand (\fB^K Y\fR) will clear the selected rectangle with SPACEs and TABsinstead of deleting it.  Over-type mode is especially useful for the filterblock command (\fB^K /\fR), since it will maintain the original width of theselected column..SS Tag searchIf you are editing a large C program with many source files, you can use the \fBctags\fR program to generate a \fBtags\fR file.  This file contains a list of program symbols and the files and positions where the symbols are defined.  The \fB^K ;\fR command can be used to lookup a symbol (functions, defined constants, etc.), load the file where the symbol is defined into the current window and position the cursor to where the symbol is defined.  \fB^K ;\fR prompts you for the symbol you want, but uses the symbol the cursor was on as a default.  Since \fB^K ;\fR loads the definition file into the current window, you probably want to split the window first with \fB^K O\fR, to have both the original file and the definition file loaded.  .SS Shell windowsHit \fB^K '\fR to run a command shell in one of JOE's windows.  When thecursor is at the end of a shell window (use \fB^K V\fR if it's not),whatever you type is passed to the shell instead of the window.  Any outputfrom the shell or from commands executed in the shell is appended to theshell window (the cursor will follow this output if it's at the end of theshell window).  This command is useful for recording the results of shellcommands- for example the output of \fBmake\fR, the result of \fBgrep\fRpinga set of files for a string, or directory listings from \fBFTP\fR sessions. Besides typeable characters, the keys ^C, Backspace, DEL, Return and ^D arepassed to the shell.  Type the shell \fBexit\fR command to stop recordingshell output.  If you press \fB^C\fR in a shell window, when the cursor isnot at the end of the window, the shell is \fBkill\fRed..SH \fBEnvironment\ variables For JOE to operate correctly, a number of other environment settings must be correct.  The throughput (baud rate) of the connection between the computer and your terminal must be set correctly for JOE to update the screen smoothly and allow typeahead to defer the screen update.  Use the \fBstty nnn\fR command to set this.  You want to set it as close as possible to actual throughput of the connection.  For example, if you are connected via a 1200 baud modem, you want to use this value for \fBstty\fR.  If you are connected via 14.4k modem, but the terminal server you are connected to connects to the computer a 9600 baud, you want to set your speed as 9600 baud.  The special baud rate of 38400 or \fBextb\fR is used to indicate that you have a very-high speed connection, such as a memory mapped console or an X-window terminal emulator.  If you can't use \fBstty\fR to set the actual throughput (perhaps because of a modem communicating with the computer at a different rate than it's communicating over the phone line), you can put a numeric value in the \fBBAUD\fR environment variable instead (use \fBsetenv BAUD 9600\fR for csh or \fBBAUD=9600; export BAUD\fR for sh).  The \fBTERM\fR environment variable must be set to the type of terminalyou're using.  If the size (number of lines/columns) of your terminal isdifferent from what is reported in the TERMCAP or TERMINFO entry, you canset this with the \fBstty rows nn cols nn\fR command, or by setting the\fBLINES\fR and \fBCOLUMNS\fR environment variables.JOE normally expects that flow control between the computer and yourterminal to use ^S/^Q handshaking (I.E., if the computer is sendingcharacters too fast for your terminal, your terminal sends ^S to stop theoutput and ^Q to restart it).  If the flow control uses out-of-band orhardware handshaking or if your terminal is fast enough to always keep upwith the computer output and you wish to map ^S/^Q to edit commands, you canset the environment variable \fBNOXON\fR to have JOE attempt to turn off^S/^Q handshaking.  If the connection between the computer and your terminaluses no handshaking and your terminal is not fast enough to keep up with theoutput of the computer, you can set the environment variable \fBDOPADDING\fRto have \fBJOE\fR slow down the output by interspersing PAD charactersbetween the terminal screen update sequences..SH FilenamesWherever JOE expects you to enter a file name, whether on the command lineor in prompts within the editor, you may also type:.IP \fB!commandRead or write data to or from a shell command.  For example,use \fBjoe '!ls'\fR to get a copy of your directory listing to edit or fromwithin the editor use \fB^K D !mail jhallen@world.std.com\fR to send thefile being edited to me..IP \fB>>filenameUse this to have JOE append the edited text to the end of the file "filename." .IP \fBfilename,START,SIZEUse this to access a fixed section of a file or device.  \fBSTART\fR and\fBSIZE\fR may be entered in decimal (ex.: 123) octal (ex.: 0777) orhexadecimal (ex.: 0xFF).  For example, use \fBjoe /dev/fd0,508,2\fR to editbytes 508 and 509 of the first floppy drive in Linux..IP \fB-Use this to get input from the standard input or to write output to thestandard output.  For example, you can put joe in a pipe of commands:\fBquota -v | joe - | mail root\fR, if you want to complain about your lowquota..SH The\ joerc file\fB^T\fR options, the help screens and the key-sequence to editor commandbindings are all defined in JOE's initialization file.  If you make a copyof this file (which normally resides in \fB@JOERC@/joerc\fR) to\fB$HOME/.joerc\fR, you can customize these setting to your liking.  Thesyntax of the initialization file should be fairly obvious and there arefurther instruction in it..SH AcknowledgmentsJOE was written by Joseph H. Allen.  If you have bug reports or questions,e-mail them to jhallen@world.std.com.  Larry Foard (entropy@world.std.com)and Gary Gray (ggray@world.std.com) also helped with the creation of JOE.

⌨️ 快捷键说明

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