| 1 | EX/VI(1) BSD Reference Manual EX/VI(1) |
| 2 | |
| 3 | N\bNA\bAM\bME\bE |
| 4 | e\bex\bx,\b, v\bvi\bi,\b, v\bvi\bie\bew\bw - text editors |
| 5 | |
| 6 | S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS |
| 7 | e\bex\bx [-\b-e\beF\bFR\bRr\brs\bsv\bv] [-\b-c\bc _\bc_\bm_\bd] [-\b-t\bt _\bt_\ba_\bg] [-\b-w\bw _\bs_\bi_\bz_\be] [_\bf_\bi_\bl_\be _\b._\b._\b.] |
| 8 | v\bvi\bi [-\b-e\beF\bFl\blR\bRr\brv\bv] [-\b-c\bc _\bc_\bm_\bd] [-\b-t\bt _\bt_\ba_\bg] [-\b-w\bw _\bs_\bi_\bz_\be] [_\bf_\bi_\bl_\be _\b._\b._\b.] |
| 9 | v\bvi\bie\bew\bw [-\b-e\beF\bFR\bRr\brv\bv] [-\b-c\bc _\bc_\bm_\bd] [-\b-t\bt _\bt_\ba_\bg] [-\b-w\bw _\bs_\bi_\bz_\be] [_\bf_\bi_\bl_\be _\b._\b._\b.] |
| 10 | |
| 11 | D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN |
| 12 | V\bVi\bi is a screen oriented text editor. E\bEx\bx is a line-oriented text editor. |
| 13 | E\bEx\bx and v\bvi\bi are different interfaces to the same program, and it is possi- |
| 14 | ble to switch back and forth during an edit session. V\bVi\bie\bew\bw is the equiva- |
| 15 | lent of using the -\b-R\bR (read-only) option of v\bvi\bi. |
| 16 | |
| 17 | This manual page is the one provided with the n\bne\bex\bx/\b/n\bnv\bvi\bi versions of the |
| 18 | e\bex\bx/\b/v\bvi\bi text editors. N\bNe\bex\bx/\b/n\bnv\bvi\bi are intended as bug-for-bug compatible re- |
| 19 | placements for the original Fourth Berkeley Software Distribution (4BSD) |
| 20 | e\bex\bx and v\bvi\bi programs. For the rest of this manual page, n\bne\bex\bx/\b/n\bnv\bvi\bi is used |
| 21 | only when it's necessary to distinguish it from the historic implementa- |
| 22 | tions of e\bex\bx/\b/v\bvi\bi. |
| 23 | |
| 24 | This manual page is intended for users already familiar with e\bex\bx/\b/v\bvi\bi. Any- |
| 25 | one else should almost certainly read a good tutorial on the editor be- |
| 26 | fore this manual page. If you're in an unfamiliar environment, and you |
| 27 | absolutely have to get work done immediately, read the section after the |
| 28 | options description, entitled ``Fast Startup''. It's probably enough to |
| 29 | get you going. |
| 30 | |
| 31 | The following options are available: |
| 32 | |
| 33 | -\b-c\bc Execute _\bc_\bm_\bd immediately after starting the edit session. Partic- |
| 34 | ularly useful for initial positioning in the file, however _\bc_\bm_\bd is |
| 35 | not limited to positioning commands. This is the POSIX 1003.2 |
| 36 | interface for the historic ``+cmd'' syntax. N\bNe\bex\bx/\b/n\bnv\bvi\bi supports |
| 37 | both the old and new syntax. |
| 38 | |
| 39 | -\b-e\be Start editing in ex mode, as if the command name were e\bex\bx. |
| 40 | |
| 41 | -\b-F\bF Don't copy the entire file when first starting to edit. (The de- |
| 42 | fault is to make a copy in case someone else modifies the file |
| 43 | during your edit session.) |
| 44 | |
| 45 | -\b-l\bl Start editing with the lisp and showmatch options set. |
| 46 | |
| 47 | -\b-R\bR Start editing in read-only mode, as if the command name was v\bvi\bie\bew\bw, |
| 48 | or the readonly option was set. |
| 49 | |
| 50 | -\b-r\br Recover the specified files, or, if no files are specified, list |
| 51 | the files that could be recovered. If no recoverable files by |
| 52 | the specified name exist, the file is edited as if the -\b-r\br option |
| 53 | had not been specified. |
| 54 | |
| 55 | -\b-s\bs Enter batch mode; applicable only to e\bex\bx edit sessions. Batch |
| 56 | mode is useful when running e\bex\bx scripts. Prompts, informative |
| 57 | messages and other user oriented message are turned off, and no |
| 58 | startup files or environmental variables are read. This is the |
| 59 | POSIX 1003.2 interface for the historic ``-'' argument. N\bNe\bex\bx/\b/n\bnv\bvi\bi |
| 60 | supports both the old and new syntax. |
| 61 | |
| 62 | -\b-t\bt Start editing at the specified tag. (See ctags(1)). |
| 63 | |
| 64 | |
| 65 | |
| 66 | -\b-w\bw Set the initial window size to the specified number of lines. |
| 67 | |
| 68 | -\b-v\bv Start editing in vi mode, as if the command name was v\bvi\bi or v\bvi\bie\bew\bw. |
| 69 | |
| 70 | -\b-X\bX Reserved for X11 interfaces. _\bN_\bo _\bX_\b1_\b1 _\bs_\bu_\bp_\bp_\bo_\br_\bt _\bi_\bs _\bc_\bu_\br_\br_\be_\bn_\bt_\bl_\by |
| 71 | _\bi_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\be_\bd_\b. |
| 72 | |
| 73 | Command input for e\bex\bx/\b/v\bvi\bi is read from the standard input. In the v\bvi\bi in- |
| 74 | terface, it is an error if standard input is not a terminal. In the e\bex\bx |
| 75 | interface, if standard input is not a terminal, e\bex\bx will read commands |
| 76 | from it regardless, however, the session will be a batch mode session, |
| 77 | exactly as if the -\b-s\bs option had been specified. |
| 78 | |
| 79 | E\bEx\bx/\b/v\bvi\bi exits 0 on success, and greater than 0 if an error occurs. |
| 80 | |
| 81 | F\bFA\bAS\bST\bT S\bST\bTA\bAR\bRT\bTU\bUP\bP |
| 82 | This section will tell you the minimum amount that you need to do simple |
| 83 | editing tasks using v\bvi\bi. If you've never used any screen editor before, |
| 84 | you're likely to have problems even with this simple introduction. In |
| 85 | that case you should find someone that already knows v\bvi\bi and have them |
| 86 | walk you through this section. |
| 87 | |
| 88 | V\bVi\bi is a screen editor. This means that it takes up almost the entire |
| 89 | screen, displaying part of the file on each screen line, except for the |
| 90 | last line of the screen. The last line of the screen is used for you to |
| 91 | give commands to v\bvi\bi, and for v\bvi\bi to give information to you. |
| 92 | |
| 93 | The other fact that you need to understand is that v\bvi\bi is a modeful edi- |
| 94 | tor, i.e. you are either entering text or you are executing commands, and |
| 95 | you have to be in the right mode to do one or the other. You will be in |
| 96 | command mode when you first start editing a file. There are commands |
| 97 | that switch you into input mode. There is only one key that takes you |
| 98 | out of input mode, and that is the <escape> key. (Key names are written |
| 99 | using less-than and greater-than signs, e.g. <escape> means the |
| 100 | ``escape'' key, usually labeled ``esc'' on your terminal's keyboard.) If |
| 101 | you're ever confused as to which mode you're in, keep entering the <es- |
| 102 | cape> key until v\bvi\bi beeps at you. (Generally, v\bvi\bi will beep at you if you |
| 103 | try and do something that's not allowed. It will also display error mes- |
| 104 | sages.) |
| 105 | |
| 106 | To start editing a file, enter the command ``vi file_name<carriage- |
| 107 | return>''. The command you should enter as soon as you start editing is |
| 108 | ``:set verbose showmode<carriage-return>''. This will make the editor |
| 109 | give you verbose error messages and display the current mode at the bot- |
| 110 | tom of the screen. |
| 111 | |
| 112 | The commands to move around the file are: |
| 113 | h\bh Move the cursor left one character. |
| 114 | j\bj Move the cursor down one line. |
| 115 | k\bk Move the cursor up one line. |
| 116 | l\bl Move the cursor right one character. |
| 117 | <\b<c\bcu\bur\brs\bso\bor\br-\b-a\bar\brr\bro\bow\bws\bs>\b> |
| 118 | The cursor arrow keys should work, too. |
| 119 | /\b/t\bte\bex\bxt\bt<\b<c\bca\bar\brr\bri\bia\bag\bge\be-\b-r\bre\bet\btu\bur\brn\bn>\b> |
| 120 | Search for the string ``text'' in the file, and move the cursor to |
| 121 | its first character. |
| 122 | |
| 123 | The commands to enter new text are: |
| 124 | a\ba Append new text, _\ba_\bf_\bt_\be_\br the cursor. |
| 125 | i\bi Insert new text, _\bb_\be_\bf_\bo_\br_\be the cursor. |
| 126 | o\bo Open a new line below the line the cursor is on, and start entering |
| 127 | text. |
| 128 | O\bO Open a new line above the line the cursor is on, and start entering |
| 129 | text. |
| 130 | <\b<e\bes\bsc\bca\bap\bpe\be>\b> |
| 131 | Once you've entered input mode using the one of the a\ba, i\bi, O\bO, or o\bo |
| 132 | commands, use <\b<e\bes\bsc\bca\bap\bpe\be>\b> to quit entering text and return to command |
| 133 | mode. |
| 134 | |
| 135 | The commands to copy text are: |
| 136 | y\byy\by Copy the line the cursor is on. |
| 137 | p\bp Append the copied line after the line the cursor is on. |
| 138 | |
| 139 | The commands to delete text are: |
| 140 | d\bdd\bd Delete the line the cursor is on. |
| 141 | x\bx Delete the character the cursor is on. |
| 142 | |
| 143 | The commands to write the file are: |
| 144 | :\b:w\bw<\b<c\bca\bar\brr\bri\bia\bag\bge\be-\b-r\bre\bet\btu\bur\brn\bn>\b> |
| 145 | Write the file back to the file with the name that you originally |
| 146 | used as an argument on the v\bvi\bi command line. |
| 147 | :\b:w\bw f\bfi\bil\ble\be_\b_n\bna\bam\bme\be<\b<c\bca\bar\brr\bri\bia\bag\bge\be-\b-r\bre\bet\btu\bur\brn\bn>\b> |
| 148 | Write the file back to the file with the name ``file_name''. |
| 149 | |
| 150 | The commands to quit editing and exit the editor are: |
| 151 | :\b:q\bq<\b<c\bca\bar\brr\bri\bia\bag\bge\be-\b-r\bre\bet\btu\bur\brn\bn>\b> |
| 152 | Quit editing and leave vi (if you've modified the file, but not |
| 153 | saved your changes, v\bvi\bi will refuse to quit). |
| 154 | :\b:q\bq!\b!<\b<c\bca\bar\brr\bri\bia\bag\bge\be-\b-r\bre\bet\btu\bur\brn\bn>\b> |
| 155 | Quit, discarding any modifications that you may have made. |
| 156 | |
| 157 | One final caution. Unusual characters can take up more than one column |
| 158 | on the screen, and long lines can take up more than a single screen line. |
| 159 | The above commands work on ``physical'' characters and lines, i.e. they |
| 160 | affect the entire line no matter how many screen lines it takes up and |
| 161 | the entire character no matter how many screen columns it takes up. |
| 162 | |
| 163 | V\bVI\bI C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS |
| 164 | The following section describes the commands available in the command |
| 165 | mode of the v\bvi\bi editor. In each entry below, the tag line is a usage syn- |
| 166 | opsis for the command character. |
| 167 | |
| 168 | [\b[c\bco\bou\bun\bnt\bt]\b] <\b<c\bco\bon\bnt\btr\bro\bol\bl-\b-A\bA>\b> |
| 169 | Search forward count times for the current word. |
| 170 | [\b[c\bco\bou\bun\bnt\bt]\b] <\b<c\bco\bon\bnt\btr\bro\bol\bl-\b-B\bB>\b> |
| 171 | Page backwards count screens. |
| 172 | [\b[c\bco\bou\bun\bnt\bt]\b] <\b<c\bco\bon\bnt\btr\bro\bol\bl-\b-D\bD>\b> |
| 173 | Scroll forward count lines. |
| 174 | [\b[c\bco\bou\bun\bnt\bt]\b] <\b<c\bco\bon\bnt\btr\bro\bol\bl-\b-E\bE>\b> |
| 175 | Scroll forward count lines, leaving the current line and column as |
| 176 | is, if possible. |
| 177 | [\b[c\bco\bou\bun\bnt\bt]\b] <\b<c\bco\bon\bnt\btr\bro\bol\bl-\b-F\bF>\b> |
| 178 | Page forward count screens. |
| 179 | <\b<c\bco\bon\bnt\btr\bro\bol\bl-\b-G\bG>\b> |
| 180 | Display the file information. |
| 181 | <\b<c\bco\bon\bnt\btr\bro\bol\bl-\b-H\bH>\b> |
| 182 | [\b[c\bco\bou\bun\bnt\bt]\b] h\bh |
| 183 | Move the cursor back count characters in the current line. |
| 184 | [\b[c\bco\bou\bun\bnt\bt]\b] <\b<c\bco\bon\bnt\btr\bro\bol\bl-\b-J\bJ>\b> |
| 185 | [\b[c\bco\bou\bun\bnt\bt]\b] <\b<c\bco\bon\bnt\btr\bro\bol\bl-\b-N\bN>\b> |
| 186 | [\b[c\bco\bou\bun\bnt\bt]\b] j\bj |
| 187 | Move the cursor down count lines without changing the current col- |
| 188 | umn. |
| 189 | <\b<c\bco\bon\bnt\btr\bro\bol\bl-\b-L\bL>\b> |
| 190 | <\b<c\bco\bon\bnt\btr\bro\bol\bl-\b-R\bR>\b> |
| 191 | Repaint the screen. |
| 192 | [\b[c\bco\bou\bun\bnt\bt]\b] <\b<c\bco\bon\bnt\btr\bro\bol\bl-\b-M\bM>\b> |
| 193 | [\b[c\bco\bou\bun\bnt\bt]\b] +\b+ |
| 194 | Move the cursor down count lines to the first nonblank character of |
| 195 | that line. |
| 196 | [\b[c\bco\bou\bun\bnt\bt]\b] <\b<c\bco\bon\bnt\btr\bro\bol\bl-\b-P\bP>\b> |
| 197 | |
| 198 | [\b[c\bco\bou\bun\bnt\bt]\b] k\bk |
| 199 | Move the cursor up count lines, without changing the current col- |
| 200 | umn. |
| 201 | <\b<c\bco\bon\bnt\btr\bro\bol\bl-\b-T\bT>\b> |
| 202 | Return to the most recent tag context. |
| 203 | <\b<c\bco\bon\bnt\btr\bro\bol\bl-\b-U\bU>\b> |
| 204 | Scroll backwards count lines. |
| 205 | <\b<c\bco\bon\bnt\btr\bro\bol\bl-\b-W\bW>\b> |
| 206 | Switch to the next lower screen in the window, or, to the first |
| 207 | screen if there are no lower screens in the window. |
| 208 | <\b<c\bco\bon\bnt\btr\bro\bol\bl-\b-Y\bY>\b> |
| 209 | Scroll backwards count lines, leaving the current line and column |
| 210 | as is, if possible. |
| 211 | <\b<c\bco\bon\bnt\btr\bro\bol\bl-\b-Z\bZ>\b> |
| 212 | Suspend the current editor session. |
| 213 | <\b<e\bes\bsc\bca\bap\bpe\be>\b> |
| 214 | Execute e\bex\bx commands or cancel partial commands. |
| 215 | <\b<c\bco\bon\bnt\btr\bro\bol\bl-\b-]\b]>\b> |
| 216 | Push a tag reference onto the tag stack. |
| 217 | <\b<c\bco\bon\bnt\btr\bro\bol\bl-\b-^\b^>\b> |
| 218 | Switch to the most recently edited file. |
| 219 | [\b[c\bco\bou\bun\bnt\bt]\b] <\b<s\bsp\bpa\bac\bce\be>\b> |
| 220 | [\b[c\bco\bou\bun\bnt\bt]\b] l\bl |
| 221 | Move the cursor forward count characters without changing the cur- |
| 222 | rent line. |
| 223 | [\b[c\bco\bou\bun\bnt\bt]\b] !\b! m\bmo\bot\bti\bio\bon\bn s\bsh\bhe\bel\bll\bl-\b-a\bar\brg\bgu\bum\bme\ben\bnt\bt(\b(s\bs)\b) |
| 224 | Replace text with results from a shell command. |
| 225 | [\b[c\bco\bou\bun\bnt\bt]\b] #\b# +\b+|\b|-\b- |
| 226 | Increment or decrement the cursor number. |
| 227 | [\b[c\bco\bou\bun\bnt\bt]\b] $\b$ |
| 228 | Move the cursor to the end of a line. |
| 229 | %\b% Move to the matching character. |
| 230 | &\b& Repeat the previous substitution command on the current line. |
| 231 | '\b'<\b<c\bch\bha\bar\bra\bac\bct\bte\ber\br>\b> |
| 232 | `\b`<\b<c\bch\bha\bar\bra\bac\bct\bte\ber\br>\b> |
| 233 | Return to a context marked by the character <character>. |
| 234 | [\b[c\bco\bou\bun\bnt\bt]\b] (\b( |
| 235 | Back up count sentences. |
| 236 | [\b[c\bco\bou\bun\bnt\bt]\b] )\b) |
| 237 | Move forward count sentences. |
| 238 | [\b[c\bco\bou\bun\bnt\bt]\b] ,\b, |
| 239 | Reverse find character count times. |
| 240 | [\b[c\bco\bou\bun\bnt\bt]\b] -\b- |
| 241 | Move to first nonblank of the previous line, count times. |
| 242 | [\b[c\bco\bou\bun\bnt\bt]\b] .\b. |
| 243 | Repeat the last v\bvi\bi command that modified text. |
| 244 | /\b/R\bRE\bE<\b<c\bca\bar\brr\bri\bia\bag\bge\be-\b-r\bre\bet\btu\bur\brn\bn>\b> |
| 245 | /\b/R\bRE\bE/\b/ [\b[o\bof\bff\bfs\bse\bet\bt]\b]<\b<c\bca\bar\brr\bri\bia\bag\bge\be-\b-r\bre\bet\btu\bur\brn\bn>\b> |
| 246 | ?\b?R\bRE\bE<\b<c\bca\bar\brr\bri\bia\bag\bge\be-\b-r\bre\bet\btu\bur\brn\bn>\b> |
| 247 | ?\b?R\bRE\bE?\b? [\b[o\bof\bff\bfs\bse\bet\bt]\b]<\b<c\bca\bar\brr\bri\bia\bag\bge\be-\b-r\bre\bet\btu\bur\brn\bn>\b> |
| 248 | N\bN |
| 249 | n\bn Search forward or backward for a regular expression. |
| 250 | 0\b0 Move to the first character in the current line. |
| 251 | : Execute an ex command. |
| 252 | [\b[c\bco\bou\bun\bnt\bt]\b] ;\b; |
| 253 | Repeat the last character find count times. |
| 254 | [\b[c\bco\bou\bun\bnt\bt]\b] <\b< m\bmo\bot\bti\bio\bon\bn |
| 255 | [\b[c\bco\bou\bun\bnt\bt]\b] >\b> m\bmo\bot\bti\bio\bon\bn |
| 256 | Shift lines left or right. |
| 257 | @\b@ b\bbu\buf\bff\bfe\ber\br |
| 258 | Execute a named buffer. |
| 259 | [\b[c\bco\bou\bun\bnt\bt]\b] A\bA |
| 260 | Enter input mode, appending the text after the end of the line. |
| 261 | [\b[c\bco\bou\bun\bnt\bt]\b] B\bB |
| 262 | |
| 263 | |
| 264 | Move backwards count bigwords. |
| 265 | [\b[b\bbu\buf\bff\bfe\ber\br]\b] [\b[c\bco\bou\bun\bnt\bt]\b] C\bC |
| 266 | Change text from the current position to the end-of-line. |
| 267 | [\b[b\bbu\buf\bff\bfe\ber\br]\b] D\bD |
| 268 | Delete text from the current position to the end-of-line. |
| 269 | [\b[c\bco\bou\bun\bnt\bt]\b] E\bE |
| 270 | Move forward count end-of-bigwords. |
| 271 | [\b[c\bco\bou\bun\bnt\bt]\b] F\bF <\b<c\bch\bha\bar\bra\bac\bct\bte\ber\br>\b> |
| 272 | Search count times backward through the current line for |
| 273 | <character>. |
| 274 | [\b[c\bco\bou\bun\bnt\bt]\b] G\bG |
| 275 | Move to line count, or the last line of the file if count not spec- |
| 276 | ified. |
| 277 | [\b[c\bco\bou\bun\bnt\bt]\b] H\bH |
| 278 | Move to the screen line count - 1 lines below the top of the |
| 279 | screen. |
| 280 | [\b[c\bco\bou\bun\bnt\bt]\b] I\bI |
| 281 | Enter input mode, inserting the text at the beginning of the line. |
| 282 | [\b[c\bco\bou\bun\bnt\bt]\b] J\bJ |
| 283 | Join lines. |
| 284 | [\b[c\bco\bou\bun\bnt\bt]\b] L\bL |
| 285 | Move to the screen line count - 1 lines above the bottom of the |
| 286 | screen. |
| 287 | M\bM Move to the screen line in the middle of the screen. |
| 288 | [\b[c\bco\bou\bun\bnt\bt]\b] O\bO |
| 289 | Enter input mode, appending text in a new line above the current |
| 290 | line. |
| 291 | [\b[b\bbu\buf\bff\bfe\ber\br]\b] P\bP |
| 292 | Insert text from a buffer. |
| 293 | Q\bQ Exit v\bvi\bi (or visual) mode and switch to e\bex\bx mode. |
| 294 | [\b[c\bco\bou\bun\bnt\bt]\b] R\bR |
| 295 | Enter input mode, replacing the characters in the current line. |
| 296 | [\b[b\bbu\buf\bff\bfe\ber\br]\b] [\b[c\bco\bou\bun\bnt\bt]\b] S\bS |
| 297 | Substitute count lines. |
| 298 | [\b[c\bco\bou\bun\bnt\bt]\b] T\bT <\b<c\bch\bha\bar\bra\bac\bct\bte\ber\br>\b> |
| 299 | Search backwards, count times, through the current line for the |
| 300 | character _\ba_\bf_\bt_\be_\br the specified <character>. |
| 301 | U\bU Restore the current line to its state before the cursor last moved |
| 302 | to it. |
| 303 | [\b[c\bco\bou\bun\bnt\bt]\b] W\bW |
| 304 | Move forward count bigwords. |
| 305 | [\b[b\bbu\buf\bff\bfe\ber\br]\b] [\b[c\bco\bou\bun\bnt\bt]\b] X\bX |
| 306 | Delete count characters before the cursor. |
| 307 | [\b[b\bbu\buf\bff\bfe\ber\br]\b] [\b[c\bco\bou\bun\bnt\bt]\b] Y\bY |
| 308 | Copy (or ``yank'') count lines into the specified buffer. |
| 309 | Z\bZZ\bZ Write the file and exit v\bvi\bi. |
| 310 | [\b[c\bco\bou\bun\bnt\bt]\b] [\b[[\b[ |
| 311 | Back up count section boundaries. |
| 312 | [\b[c\bco\bou\bun\bnt\bt]\b] ]\b]]\b] |
| 313 | Move forward count section boundaries. |
| 314 | ^\b^ Move to first nonblank character on the current line. |
| 315 | [\b[c\bco\bou\bun\bnt\bt]\b] _\b_ |
| 316 | Move down count - 1 lines, to the first nonblank character. |
| 317 | [\b[c\bco\bou\bun\bnt\bt]\b] a\ba |
| 318 | Enter input mode, appending the text after the cursor. |
| 319 | [\b[c\bco\bou\bun\bnt\bt]\b] b\bb |
| 320 | Move backwards count words. |
| 321 | [\b[b\bbu\buf\bff\bfe\ber\br]\b] [\b[c\bco\bou\bun\bnt\bt]\b] c\bc m\bmo\bot\bti\bio\bon\bn |
| 322 | Change a region of text. |
| 323 | [\b[b\bbu\buf\bff\bfe\ber\br]\b] [\b[c\bco\bou\bun\bnt\bt]\b] d\bd m\bmo\bot\bti\bio\bon\bn |
| 324 | Delete a region of text. |
| 325 | [\b[c\bco\bou\bun\bnt\bt]\b] e\be |
| 326 | Move forward count end-of-words. |
| 327 | [\b[c\bco\bou\bun\bnt\bt]\b] f\bf<\b<c\bch\bha\bar\bra\bac\bct\bte\ber\br>\b> |
| 328 | Search forward, count times, through the rest of the current line |
| 329 | |
| 330 | for <character>. |
| 331 | [\b[c\bco\bou\bun\bnt\bt]\b] i\bi |
| 332 | Enter input mode, inserting the text before the cursor. |
| 333 | m\bm <\b<c\bch\bha\bar\bra\bac\bct\bte\ber\br>\b> |
| 334 | Save the current context (line and column) as <character>. |
| 335 | [\b[c\bco\bou\bun\bnt\bt]\b] o\bo |
| 336 | Enter input mode, appending text in a new line under the current |
| 337 | line. |
| 338 | [\b[b\bbu\buf\bff\bfe\ber\br]\b] p\bp |
| 339 | Append text from a buffer. |
| 340 | [\b[c\bco\bou\bun\bnt\bt]\b] r\br <\b<c\bch\bha\bar\bra\bac\bct\bte\ber\br>\b> |
| 341 | Replace count characters. |
| 342 | [\b[b\bbu\buf\bff\bfe\ber\br]\b] [\b[c\bco\bou\bun\bnt\bt]\b] s\bs |
| 343 | Substitute count characters in the current line starting with the |
| 344 | current character. |
| 345 | [\b[c\bco\bou\bun\bnt\bt]\b] t\bt <\b<c\bch\bha\bar\bra\bac\bct\bte\ber\br>\b> |
| 346 | Search forward, count times, through the current line for the char- |
| 347 | acter immediately _\bb_\be_\bf_\bo_\br_\be <character>. |
| 348 | u\bu Undo the last change made to the file. |
| 349 | [\b[c\bco\bou\bun\bnt\bt]\b] w\bw |
| 350 | Move forward count words. |
| 351 | [\b[b\bbu\buf\bff\bfe\ber\br]\b] [\b[c\bco\bou\bun\bnt\bt]\b] x\bx |
| 352 | Delete count characters. |
| 353 | [\b[b\bbu\buf\bff\bfe\ber\br]\b] [\b[c\bco\bou\bun\bnt\bt]\b] y\by m\bmo\bot\bti\bio\bon\bn |
| 354 | Copy (or ``yank'') a text region specified by the count and motion |
| 355 | into a buffer. |
| 356 | [\b[c\bco\bou\bun\bnt\bt1\b1]\b] z\bz [\b[c\bco\bou\bun\bnt\bt2\b2]\b] -\b-|\b|.\b.|\b|+\b+|\b|^\b^|\b|<\b<c\bca\bar\brr\bri\bia\bag\bge\be-\b-r\bre\bet\btu\bur\brn\bn>\b> |
| 357 | Redraw, optionally repositioning and resizing the screen. |
| 358 | [\b[c\bco\bou\bun\bnt\bt]\b] {\b{ |
| 359 | Move backward count paragraphs. |
| 360 | [\b[c\bco\bou\bun\bnt\bt]\b] |\b| |
| 361 | Move to a specific _\bc_\bo_\bl_\bu_\bm_\bn position on the current line. |
| 362 | [\b[c\bco\bou\bun\bnt\bt]\b] }\b} |
| 363 | Move forward count paragraphs. |
| 364 | [\b[c\bco\bou\bun\bnt\bt]\b] ~\b~ |
| 365 | Reverse the case of the next count character(s). |
| 366 | [\b[c\bco\bou\bun\bnt\bt]\b] ~\b~ m\bmo\bot\bti\bio\bon\bn |
| 367 | Reverse the case of the characters in a text region specified by |
| 368 | the count and motion. |
| 369 | <\b<i\bin\bnt\bte\ber\brr\bru\bup\bpt\bt>\b> |
| 370 | Interrupt the current operation. |
| 371 | |
| 372 | V\bVI\bI T\bTE\bEX\bXT\bT I\bIN\bNP\bPU\bUT\bT C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS |
| 373 | The following section describes the commands available in the text input |
| 374 | mode of the v\bvi\bi editor. |
| 375 | |
| 376 | <\b<n\bnu\bul\bl>\b> |
| 377 | Replay the previous input. |
| 378 | <\b<c\bco\bon\bnt\btr\bro\bol\bl-\b-D\bD>\b> |
| 379 | Erase the previous autoindent character. |
| 380 | ^\b^<\b<c\bco\bon\bnt\btr\bro\bol\bl-\b-D\bD>\b> |
| 381 | Erase all of the autoindent characters, and reset the autoindent |
| 382 | level. |
| 383 | 0\b0<\b<c\bco\bon\bnt\btr\bro\bol\bl-\b-D\bD>\b> |
| 384 | Erase all of the autoindent characters. |
| 385 | <\b<c\bco\bon\bnt\btr\bro\bol\bl-\b-T\bT>\b> |
| 386 | Insert sufficient <tab> and <space> characters to move the cursor |
| 387 | forward to a column immediately after the next column which is an |
| 388 | even multiple of the s\bsh\bhi\bif\bft\btw\bwi\bid\bdt\bth\bh option. |
| 389 | <\b<e\ber\bra\bas\bse\be>\b> |
| 390 | <\b<c\bco\bon\bnt\btr\bro\bol\bl-\b-H\bH>\b> |
| 391 | Erase the last character. |
| 392 | <\b<l\bli\bit\bte\ber\bra\bal\bl n\bne\bex\bxt\bt>\b> |
| 393 | Quote the next character. |
| 394 | <\b<e\bes\bsc\bca\bap\bpe\be>\b> |
| 395 | |
| 396 | Resolve all text input into the file, and return to command mode. |
| 397 | <\b<l\bli\bin\bne\be e\ber\bra\bas\bse\be>\b> |
| 398 | Erase the current line. |
| 399 | <\b<c\bco\bon\bnt\btr\bro\bol\bl-\b-W\bW>\b> |
| 400 | <\b<w\bwo\bor\brd\bd e\ber\bra\bas\bse\be>\b> |
| 401 | Erase the last word. The definition of word is dependent on the |
| 402 | a\bal\blt\btw\bwe\ber\bra\bas\bse\be and t\btt\bty\byw\bwe\ber\bra\bas\bse\be options. |
| 403 | <\b<c\bco\bon\bnt\btr\bro\bol\bl-\b-X\bX>\b>[\b[0\b0-\b-9\b9A\bA-\b-F\bFa\ba-\b-f\bf]\b]*\b* |
| 404 | Insert a character with the specified hexadecimal value into the |
| 405 | text. |
| 406 | <\b<i\bin\bnt\bte\ber\brr\bru\bup\bpt\bt>\b> |
| 407 | Interrupt text input mode, returning to command mode. |
| 408 | |
| 409 | E\bEX\bX C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS |
| 410 | The following section describes the commands available in the e\bex\bx editor. |
| 411 | In each entry below, the tag line is a usage synopsis for the command. |
| 412 | |
| 413 | <\b<e\ben\bnd\bd-\b-o\bof\bf-\b-f\bfi\bil\ble\be>\b> |
| 414 | Scroll the screen. |
| 415 | !\b! a\bar\brg\bgu\bum\bme\ben\bnt\bt(\b(s\bs)\b) |
| 416 | [\b[r\bra\ban\bng\bge\be]\b]!\b! a\bar\brg\bgu\bum\bme\ben\bnt\bt(\b(s\bs)\b) |
| 417 | Execute a shell command, or filter lines through a shell command. |
| 418 | "\b" A comment. |
| 419 | [\b[r\bra\ban\bng\bge\be]\b] n\bnu\bu[\b[m\bmb\bbe\ber\br]\b] [\b[c\bco\bou\bun\bnt\bt]\b] [\b[f\bfl\bla\bag\bgs\bs]\b] |
| 420 | [\b[r\bra\ban\bng\bge\be]\b] #\b# [\b[c\bco\bou\bun\bnt\bt]\b] [\b[f\bfl\bla\bag\bgs\bs]\b] |
| 421 | Display the selected lines, each preceded with its line number. |
| 422 | @\b@ b\bbu\buf\bff\bfe\ber\br |
| 423 | *\b* b\bbu\buf\bff\bfe\ber\br |
| 424 | Execute a buffer. |
| 425 | [\b[r\bra\ban\bng\bge\be]\b] d\bd[\b[e\bel\ble\bet\bte\be]\b] [\b[b\bbu\buf\bff\bfe\ber\br]\b] [\b[c\bco\bou\bun\bnt\bt]\b] [\b[f\bfl\bla\bag\bgs\bs]\b] |
| 426 | Delete the lines from the file. |
| 427 | d\bdi\bi[\b[s\bsp\bpl\bla\bay\by]\b] b\bb[\b[u\buf\bff\bfe\ber\brs\bs]\b] |\b| s\bs[\b[c\bcr\bre\bee\ben\bns\bs]\b] |\b| t\bt[\b[a\bag\bgs\bs]\b] |
| 428 | Display buffers, screens or tags. |
| 429 | e\be[\b[d\bdi\bit\bt]\b][\b[!\b!]\b] [\b[+\b+c\bcm\bmd\bd]\b] [\b[f\bfi\bil\ble\be]\b] |
| 430 | e\bex\bx[\b[!\b!]\b] [\b[+\b+c\bcm\bmd\bd]\b] [\b[f\bfi\bil\ble\be]\b] |
| 431 | Edit a different file. |
| 432 | e\bex\bxu\bu[\b[s\bsa\bag\bge\be]\b] [\b[c\bco\bom\bmm\bma\ban\bnd\bd]\b] |
| 433 | Display usage for an e\bex\bx command. |
| 434 | f\bf[\b[i\bil\ble\be]\b] [\b[f\bfi\bil\ble\be]\b] |
| 435 | Display and optionally change the file name. |
| 436 | f\bfg\bg [\b[n\bna\bam\bme\be]\b] |
| 437 | V\bVi\bi mode only. Foreground the specified screen. |
| 438 | [\b[r\bra\ban\bng\bge\be]\b] g\bg[\b[l\blo\bob\bba\bal\bl]\b] /\b/p\bpa\bat\btt\bte\ber\brn\bn/\b/ [\b[c\bco\bom\bmm\bma\ban\bnd\bds\bs]\b] |
| 439 | [\b[r\bra\ban\bng\bge\be]\b] v\bv /\b/p\bpa\bat\btt\bte\ber\brn\bn/\b/ [\b[c\bco\bom\bmm\bma\ban\bnd\bds\bs]\b] |
| 440 | Apply commands to lines matching (or not matching) a pattern. |
| 441 | h\bhe\be[\b[l\blp\bp]\b] |
| 442 | Display a help message. |
| 443 | [\b[l\bli\bin\bne\be]\b] i\bi[\b[n\bns\bse\ber\brt\bt]\b][\b[!\b!]\b] |
| 444 | The input text is inserted before the specified line. |
| 445 | [\b[r\bra\ban\bng\bge\be]\b] j\bj[\b[o\boi\bin\bn]\b][\b[!\b!]\b] [\b[c\bco\bou\bun\bnt\bt]\b] [\b[f\bfl\bla\bag\bgs\bs]\b] |
| 446 | Join lines of text together. |
| 447 | [\b[r\bra\ban\bng\bge\be]\b] l\bl[\b[i\bis\bst\bt]\b] [\b[c\bco\bou\bun\bnt\bt]\b] [\b[f\bfl\bla\bag\bgs\bs]\b] |
| 448 | Display the lines unambiguously. |
| 449 | m\bma\bap\bp[\b[!\b!]\b] [\b[l\blh\bhs\bs r\brh\bhs\bs]\b] |
| 450 | Define or display maps (for v\bvi\bi only). |
| 451 | [\b[l\bli\bin\bne\be]\b] m\bma\ba[\b[r\brk\bk]\b] <\b<c\bch\bha\bar\bra\bac\bct\bte\ber\br>\b> |
| 452 | [\b[l\bli\bin\bne\be]\b] k\bk <\b<c\bch\bha\bar\bra\bac\bct\bte\ber\br>\b> |
| 453 | Mark the line with the mark <character>. |
| 454 | [\b[r\bra\ban\bng\bge\be]\b] m\bm[\b[o\bov\bve\be]\b] l\bli\bin\bne\be |
| 455 | Move the specified lines after the target line. |
| 456 | m\bmk\bk[\b[e\bex\bxr\brc\bc]\b][\b[!\b!]\b] f\bfi\bil\ble\be |
| 457 | Write the abbreviations, editor options and maps to the specified |
| 458 | file. |
| 459 | n\bn[\b[e\bex\bxt\bt]\b][\b[!\b!]\b] [\b[f\bfi\bil\ble\be .\b..\b..\b.]\b] |
| 460 | |
| 461 | |
| 462 | Edit the next file from the argument list. |
| 463 | [\b[l\bli\bin\bne\be]\b] o\bo[\b[p\bpe\ben\bn]\b] /\b/p\bpa\bat\btt\bte\ber\brn\bn/\b/ [\b[f\bfl\bla\bag\bgs\bs]\b] |
| 464 | Enter open mode. |
| 465 | p\bpr\bre\be[\b[s\bse\ber\brv\bve\be]\b] |
| 466 | Save the file in a form that can later be recovered using the e\bex\bx -\b-r\br |
| 467 | option. |
| 468 | p\bpr\bre\bev\bv[\b[i\bio\bou\bus\bs]\b][\b[!\b!]\b] |
| 469 | Edit the previous file from the argument list. |
| 470 | [\b[r\bra\ban\bng\bge\be]\b] p\bp[\b[r\bri\bin\bnt\bt]\b] [\b[c\bco\bou\bun\bnt\bt]\b] [\b[f\bfl\bla\bag\bgs\bs]\b] |
| 471 | Display the specified lines. |
| 472 | [\b[l\bli\bin\bne\be]\b] p\bpu\bu[\b[t\bt]\b] [\b[b\bbu\buf\bff\bfe\ber\br]\b] |
| 473 | Append buffer contents to the current line. |
| 474 | q\bq[\b[u\bui\bit\bt]\b][\b[!\b!]\b] |
| 475 | End the editing session. |
| 476 | [\b[l\bli\bin\bne\be]\b] r\br[\b[e\bea\bad\bd]\b][\b[!\b!]\b] [\b[f\bfi\bil\ble\be]\b] |
| 477 | Read a file. |
| 478 | r\bre\bec\bc[\b[o\bov\bve\ber\br]\b] f\bfi\bil\ble\be |
| 479 | Recover file if it was previously saved. |
| 480 | r\bre\bes\bs[\b[i\biz\bze\be]\b] [\b[+\b+|\b|-\b-]\b]s\bsi\biz\bze\be |
| 481 | V\bVi\bi mode only. Grow or shrink the current screen. |
| 482 | r\bre\bew\bw[\b[i\bin\bnd\bd]\b][\b[!\b!]\b] |
| 483 | Rewind the argument list. |
| 484 | s\bse\be[\b[t\bt]\b] [\b[o\bop\bpt\bti\bio\bon\bn[\b[=\b=[\b[v\bva\bal\blu\bue\be]\b]]\b] .\b..\b..\b.]\b] [\b[n\bno\boo\bop\bpt\bti\bio\bon\bn .\b..\b..\b.]\b] [\b[o\bop\bpt\bti\bio\bon\bn?\b? .\b..\b..\b.]\b] [\b[a\bal\bll\bl]\b] |
| 485 | Display or set editor options. |
| 486 | s\bsh\bh[\b[e\bel\bll\bl]\b] |
| 487 | Run a shell program. |
| 488 | s\bso\bo[\b[u\bur\brc\bce\be]\b] f\bfi\bil\ble\be |
| 489 | Read and execute e\bex\bx commands from a file. |
| 490 | s\bsp\bp[\b[l\bli\bit\bt]\b] [\b[f\bfi\bil\ble\be .\b..\b..\b.]\b] |
| 491 | V\bVi\bi mode only. Split the screen. |
| 492 | [\b[r\bra\ban\bng\bge\be]\b] s\bs[\b[u\bub\bbs\bst\bti\bit\btu\but\bte\be]\b] [\b[/\b/p\bpa\bat\btt\bte\ber\brn\bn/\b/r\bre\bep\bpl\bla\bac\bce\be/\b/]\b] [\b[o\bop\bpt\bti\bio\bon\bns\bs]\b] [\b[c\bco\bou\bun\bnt\bt]\b] [\b[f\bfl\bla\bag\bgs\bs]\b] |
| 493 | [\b[r\bra\ban\bng\bge\be]\b] &\b& [\b[o\bop\bpt\bti\bio\bon\bns\bs]\b] [\b[c\bco\bou\bun\bnt\bt]\b] [\b[f\bfl\bla\bag\bgs\bs]\b] |
| 494 | [\b[r\bra\ban\bng\bge\be]\b] ~\b~ [\b[o\bop\bpt\bti\bio\bon\bns\bs]\b] [\b[c\bco\bou\bun\bnt\bt]\b] [\b[f\bfl\bla\bag\bgs\bs]\b] |
| 495 | Make substitutions. |
| 496 | s\bsu\bu[\b[s\bsp\bpe\ben\bnd\bd]\b][\b[!\b!]\b] |
| 497 | s\bst\bt[\b[o\bop\bp]\b][\b[!\b!]\b] |
| 498 | <\b<s\bsu\bus\bsp\bpe\ben\bnd\bd>\b> |
| 499 | Suspend the edit session. |
| 500 | t\bta\ba[\b[g\bg]\b][\b[!\b!]\b] t\bta\bag\bgs\bst\btr\bri\bin\bng\bg |
| 501 | Edit the file containing the specified tag. |
| 502 | t\bta\bag\bgp\bp[\b[o\bop\bp]\b][\b[!\b!]\b] [\b[f\bfi\bil\ble\be |\b| n\bnu\bum\bmb\bbe\ber\br]\b] |
| 503 | Pop to the specified tag in the tags stack. |
| 504 | u\bun\bnm\bm[\b[a\bap\bp]\b][\b[!\b!]\b] l\blh\bhs\bs |
| 505 | Unmap a mapped string. |
| 506 | v\bve\be[\b[r\brs\bsi\bio\bon\bn]\b] |
| 507 | Display the version of the e\bex\bx/\b/v\bvi\bi editor. |
| 508 | [\b[l\bli\bin\bne\be]\b] v\bvi\bi[\b[s\bsu\bua\bal\bl]\b] [\b[t\bty\byp\bpe\be]\b] [\b[c\bco\bou\bun\bnt\bt]\b] [\b[f\bfl\bla\bag\bgs\bs]\b] |
| 509 | E\bEx\bx mode only. Enter v\bvi\bi. |
| 510 | v\bvi\bi[\b[s\bsu\bua\bal\bl]\b][\b[!\b!]\b] [\b[+\b+c\bcm\bmd\bd]\b] [\b[f\bfi\bil\ble\be]\b] |
| 511 | V\bVi\bi mode only. Edit a new file. |
| 512 | v\bvi\biu\bu[\b[s\bsa\bag\bge\be]\b] [\b[c\bco\bom\bmm\bma\ban\bnd\bd]\b] |
| 513 | Display usage for a v\bvi\bi command. |
| 514 | [\b[r\bra\ban\bng\bge\be]\b] w\bw[\b[r\bri\bit\bte\be]\b][\b[!\b!]\b] [\b[>\b>>\b>]\b] [\b[f\bfi\bil\ble\be]\b] |
| 515 | [\b[r\bra\ban\bng\bge\be]\b] w\bw[\b[r\bri\bit\bte\be]\b] [\b[!\b!]\b] [\b[f\bfi\bil\ble\be]\b] |
| 516 | [\b[r\bra\ban\bng\bge\be]\b] w\bwn\bn[\b[!\b!]\b] [\b[>\b>>\b>]\b] [\b[f\bfi\bil\ble\be]\b] |
| 517 | [\b[r\bra\ban\bng\bge\be]\b] w\bwq\bq[\b[!\b!]\b] [\b[>\b>>\b>]\b] [\b[f\bfi\bil\ble\be]\b] |
| 518 | Write the file. |
| 519 | [\b[r\bra\ban\bng\bge\be]\b] x\bx[\b[i\bit\bt]\b][\b[!\b!]\b] [\b[f\bfi\bil\ble\be]\b] |
| 520 | Write the file if it has been modified. |
| 521 | [\b[r\bra\ban\bng\bge\be]\b] y\bya\ba[\b[n\bnk\bk]\b] [\b[b\bbu\buf\bff\bfe\ber\br]\b] [\b[c\bco\bou\bun\bnt\bt]\b] |
| 522 | Copy the specified lines to a buffer. |
| 523 | [\b[l\bli\bin\bne\be]\b] z\bz [\b[t\bty\byp\bpe\be]\b] [\b[c\bco\bou\bun\bnt\bt]\b] [\b[f\bfl\bla\bag\bgs\bs]\b] |
| 524 | Adjust the window. |
| 525 | |
| 526 | S\bSE\bET\bT O\bOP\bPT\bTI\bIO\bON\bNS\bS |
| 527 | There are a large number of options that may be set (or unset) to change |
| 528 | the editor's behavior. This section describes the options, their abbre- |
| 529 | viations and their default values. |
| 530 | |
| 531 | In each entry below, the first part of the tag line is the full name of |
| 532 | the option, followed by any equivalent abbreviations. The part in square |
| 533 | brackets is the default value of the option. Most of the options are |
| 534 | boolean, i.e. they are either on or off, and do not have an associated |
| 535 | value. |
| 536 | |
| 537 | Options apply to both e\bex\bx and v\bvi\bi modes, unless otherwise specified. |
| 538 | |
| 539 | a\bal\blt\btw\bwe\ber\bra\bas\bse\be [\b[o\bof\bff\bf]\b] |
| 540 | V\bVi\bi only. Select an alternate word erase algorithm. |
| 541 | a\bau\but\bto\boi\bin\bnd\bde\ben\bnt\bt,\b, a\bai\bi [\b[o\bof\bff\bf]\b] |
| 542 | Automatically indent new lines. |
| 543 | a\bau\but\bto\bop\bpr\bri\bin\bnt\bt,\b, a\bap\bp [\b[o\bof\bff\bf]\b] |
| 544 | E\bEx\bx only. Display the current line automatically. |
| 545 | a\bau\but\bto\bow\bwr\bri\bit\bte\be,\b, a\baw\bw [\b[o\bof\bff\bf]\b] |
| 546 | Write modified files automatically when changing files. |
| 547 | b\bba\bac\bck\bku\bup\bp [\b["\b""\b"]\b] |
| 548 | Backup files before they are overwritten. |
| 549 | b\bbe\bea\bau\but\bti\bif\bfy\by,\b, b\bbf\bf [\b[o\bof\bff\bf]\b] |
| 550 | Discard control characters. |
| 551 | c\bcd\bdp\bpa\bat\bth\bh [\b[e\ben\bnv\bvi\bir\bro\bon\bnm\bme\ben\bnt\bt v\bva\bar\bri\bia\bab\bbl\ble\be C\bCD\bDP\bPA\bAT\bTH\bH,\b, o\bor\br c\bcu\bur\brr\bre\ben\bnt\bt d\bdi\bir\bre\bec\bct\bto\bor\bry\by]\b] |
| 552 | The directory paths used as path prefixes for the c\bcd\bd command. |
| 553 | c\bco\bol\blu\bum\bmn\bns\bs,\b, c\bco\bo [\b[8\b80\b0]\b] |
| 554 | Set the number of columns in the screen. |
| 555 | c\bco\bom\bmm\bme\ben\bnt\bt [\b[o\bof\bff\bf]\b] |
| 556 | V\bVi\bi only. Skip leading comments in files. |
| 557 | d\bdi\bir\bre\bec\bct\bto\bor\bry\by,\b, d\bdi\bir\br [\b[e\ben\bnv\bvi\bir\bro\bon\bnm\bme\ben\bnt\bt v\bva\bar\bri\bia\bab\bbl\ble\be T\bTM\bMP\bPD\bDI\bIR\bR,\b, o\bor\br /\b/t\btm\bmp\bp]\b] |
| 558 | The directory where temporary files are created. |
| 559 | e\bed\bdc\bco\bom\bmp\bpa\bat\bti\bib\bbl\ble\be,\b, e\bed\bd [\b[o\bof\bff\bf]\b] |
| 560 | Remember the values of the ``c'' and ``g'' suffices to the |
| 561 | s\bsu\bub\bbs\bst\bti\bit\btu\but\bte\be commands, instead of initializing them as unset for each |
| 562 | new command. |
| 563 | e\ber\brr\bro\bor\brb\bbe\bel\bll\bls\bs,\b, e\beb\bb [\b[o\bof\bff\bf]\b] |
| 564 | E\bEx\bx only. Announce error messages with a bell. |
| 565 | e\bex\bxr\brc\bc,\b, e\bex\bx [\b[o\bof\bff\bf]\b] |
| 566 | Never read startup files in the local directory. |
| 567 | e\bex\bxt\bte\ben\bnd\bde\bed\bd [\b[o\bof\bff\bf]\b] |
| 568 | Regular expressions are extended (i.e. egrep(1) style) expres- |
| 569 | sions. |
| 570 | f\bfl\bla\bas\bsh\bh [\b[o\bon\bn]\b] |
| 571 | Flash the screen instead of beeping the keyboard on error. |
| 572 | h\bha\bar\brd\bdt\bta\bab\bbs\bs,\b, h\bht\bt [\b[8\b8]\b] |
| 573 | Set the spacing between hardware tab settings. |
| 574 | i\big\bgn\bno\bor\bre\bec\bca\bas\bse\be,\b, i\bic\bc [\b[o\bof\bff\bf]\b] |
| 575 | Ignore case differences in regular expressions. |
| 576 | k\bke\bey\byt\bti\bim\bme\be [\b[6\b6]\b] |
| 577 | The 10th's of a second e\bex\bx/\b/v\bvi\bi waits for a subsequent key to complete |
| 578 | a key mapping. |
| 579 | l\ble\bef\bft\btr\bri\big\bgh\bht\bt [\b[o\bof\bff\bf]\b] |
| 580 | V\bVi\bi only. Do left-right scrolling. |
| 581 | l\bli\bin\bne\bes\bs,\b, l\bli\bi [\b[2\b24\b4]\b] |
| 582 | V\bVi\bi only. Set the number of lines in the screen. |
| 583 | l\bli\bis\bsp\bp [\b[o\bof\bff\bf]\b] |
| 584 | V\bVi\bi only. Modify various search commands and options to work with |
| 585 | Lisp. |
| 586 | |
| 587 | _\bT_\bh_\bi_\bs _\bo_\bp_\bt_\bi_\bo_\bn _\bi_\bs _\bn_\bo_\bt _\by_\be_\bt _\bi_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\be_\bd_\b. |
| 588 | l\bli\bis\bst\bt [\b[o\bof\bff\bf]\b] |
| 589 | Display lines in an unambiguous fashion. |
| 590 | l\blo\boc\bck\bk [\b[o\bon\bn]\b] |
| 591 | Attempt to get an exclusive lock on any file being edited, read or |
| 592 | |
| 593 | |
| 594 | written. |
| 595 | m\bma\bag\bgi\bic\bc [\b[o\bon\bn]\b] |
| 596 | Treat certain characters specially in regular expressions. |
| 597 | m\bma\bat\btc\bch\bht\bti\bim\bme\be [\b[7\b7]\b] |
| 598 | V\bVi\bi only. The 10th's of a second e\bex\bx/\b/v\bvi\bi pauses on the matching char- |
| 599 | acter when the s\bsh\bho\bow\bwm\bma\bat\btc\bch\bh option is set. |
| 600 | m\bme\bes\bsg\bg [\b[o\bon\bn]\b] |
| 601 | Permit messages from other users. |
| 602 | m\bmo\bod\bde\bel\bli\bin\bne\bes\bs,\b, m\bmo\bod\bde\bel\bli\bin\bne\be [\b[o\bof\bff\bf]\b] |
| 603 | Read the first and last few lines of each file for e\bex\bx commands. |
| 604 | |
| 605 | _\bT_\bh_\bi_\bs _\bo_\bp_\bt_\bi_\bo_\bn _\bw_\bi_\bl_\bl _\bn_\be_\bv_\be_\br _\bb_\be _\bi_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\be_\bd_\b. |
| 606 | n\bnu\bum\bmb\bbe\ber\br,\b, n\bnu\bu [\b[o\bof\bff\bf]\b] |
| 607 | Precede each line displayed with its current line number. |
| 608 | o\boc\bct\bta\bal\bl [\b[o\bof\bff\bf]\b] |
| 609 | Display unknown characters as octal numbers, instead of the default |
| 610 | hexadecimal. |
| 611 | o\bop\bpe\ben\bn [\b[o\bon\bn]\b] |
| 612 | E\bEx\bx only. If this option is not set, the o\bop\bpe\ben\bn and v\bvi\bis\bsu\bua\bal\bl commands |
| 613 | are disallowed. |
| 614 | o\bop\bpt\bti\bim\bmi\biz\bze\be,\b, o\bop\bpt\bt [\b[o\bon\bn]\b] |
| 615 | V\bVi\bi only. Optimize text throughput to dumb terminals. |
| 616 | |
| 617 | _\bT_\bh_\bi_\bs _\bo_\bp_\bt_\bi_\bo_\bn _\bi_\bs _\bn_\bo_\bt _\by_\be_\bt _\bi_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\be_\bd_\b. |
| 618 | p\bpa\bar\bra\bag\bgr\bra\bap\bph\bhs\bs,\b, p\bpa\bar\bra\ba [\b[I\bIP\bPL\bLP\bPP\bPP\bPQ\bQP\bPP\bP L\bLI\bIp\bpp\bpl\blp\bpi\bip\bpb\bbp\bp]\b] |
| 619 | V\bVi\bi only. Define additional paragraph boundaries for the {\b{ and }\b} |
| 620 | commands. |
| 621 | p\bpr\bro\bom\bmp\bpt\bt [\b[o\bon\bn]\b] |
| 622 | E\bEx\bx only. Display a command prompt. |
| 623 | r\bre\bea\bad\bdo\bon\bnl\bly\by,\b, r\bro\bo [\b[o\bof\bff\bf]\b] |
| 624 | Mark the file as read-only. |
| 625 | r\bre\bec\bcd\bdi\bir\br [\b[/\b/v\bva\bar\br/\b/t\btm\bmp\bp/\b/v\bvi\bi.\b.r\bre\bec\bco\bov\bve\ber\br]\b] |
| 626 | The directory where recovery files are stored. |
| 627 | r\bre\bed\bdr\bra\baw\bw,\b, r\bre\be [\b[o\bof\bff\bf]\b] |
| 628 | V\bVi\bi only. Simulate an intelligent terminal on a dumb one. |
| 629 | |
| 630 | _\bT_\bh_\bi_\bs _\bo_\bp_\bt_\bi_\bo_\bn _\bi_\bs _\bn_\bo_\bt _\by_\be_\bt _\bi_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\be_\bd_\b. |
| 631 | r\bre\bem\bma\bap\bp [\b[o\bon\bn]\b] |
| 632 | Remap keys until resolved. |
| 633 | r\bre\bep\bpo\bor\brt\bt [\b[5\b5]\b] |
| 634 | Set the number of lines about which the editor reports changes or |
| 635 | yanks. |
| 636 | r\bru\bul\ble\ber\br [\b[o\bof\bff\bf]\b] |
| 637 | V\bVi\bi only. Display a row/column ruler on the colon command line. |
| 638 | s\bsc\bcr\bro\bol\bll\bl,\b, s\bsc\bcr\br [\b[w\bwi\bin\bnd\bdo\bow\bw /\b/ 2\b2]\b] |
| 639 | Set the number of lines scrolled. |
| 640 | s\bse\bec\bct\bti\bio\bon\bns\bs,\b, s\bse\bec\bct\bt [\b[N\bNH\bHS\bSH\bHH\bH H\bHU\bUn\bnh\bhs\bsh\bh]\b] |
| 641 | V\bVi\bi only. Define additional section boundaries for the [\b[[\b[ and ]\b]]\b] |
| 642 | commands. |
| 643 | s\bsh\bhe\bel\bll\bl,\b, s\bsh\bh [\b[e\ben\bnv\bvi\bir\bro\bon\bnm\bme\ben\bnt\bt v\bva\bar\bri\bia\bab\bbl\ble\be S\bSH\bHE\bEL\bLL\bL,\b, o\bor\br /\b/b\bbi\bin\bn/\b/s\bsh\bh]\b] |
| 644 | Select the shell used by the editor. |
| 645 | s\bsh\bhe\bel\bll\blm\bme\bet\bta\ba [\b[~\b~{\b{[\b[*\b*?\b?$\b$`\b`'\b'"\b"\\b\]\b] |
| 646 | Set the meta characters checked to determine if file name expansion |
| 647 | is necessary. |
| 648 | s\bsh\bhi\bif\bft\btw\bwi\bid\bdt\bth\bh,\b, s\bsw\bw [\b[8\b8]\b] |
| 649 | Set the autoindent and shift command indentation width. |
| 650 | s\bsh\bho\bow\bwm\bma\bat\btc\bch\bh,\b, s\bsm\bm [\b[o\bof\bff\bf]\b] |
| 651 | V\bVi\bi only. Note matching ``{'' and ``('' for ``}'' and ``)'' charac- |
| 652 | ters. |
| 653 | s\bsh\bho\bow\bwm\bmo\bod\bde\be [\b[o\bof\bff\bf]\b] |
| 654 | V\bVi\bi only. Display the current editor mode and a ``modified'' flag. |
| 655 | s\bsi\bid\bde\bes\bsc\bcr\bro\bol\bll\bl [\b[1\b16\b6]\b] |
| 656 | V\bVi\bi only. Set the amount a left-right scroll will shift. |
| 657 | s\bsl\blo\bow\bwo\bop\bpe\ben\bn,\b, s\bsl\blo\bow\bw [\b[o\bof\bff\bf]\b] |
| 658 | Delay display updating during text input. |
| 659 | |
| 660 | |
| 661 | _\bT_\bh_\bi_\bs _\bo_\bp_\bt_\bi_\bo_\bn _\bi_\bs _\bn_\bo_\bt _\by_\be_\bt _\bi_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\be_\bd_\b. |
| 662 | s\bso\bou\bur\brc\bce\bea\ban\bny\by [\b[o\bof\bff\bf]\b] |
| 663 | Read startup files not owned by the current user. |
| 664 | |
| 665 | _\bT_\bh_\bi_\bs _\bo_\bp_\bt_\bi_\bo_\bn _\bw_\bi_\bl_\bl _\bn_\be_\bv_\be_\br _\bb_\be _\bi_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\be_\bd_\b. |
| 666 | t\bta\bab\bbs\bst\bto\bop\bp,\b, t\bts\bs [\b[8\b8]\b] |
| 667 | This option sets tab widths for the editor display. |
| 668 | t\bta\bag\bgl\ble\ben\bng\bgt\bth\bh,\b, t\btl\bl [\b[0\b0]\b] |
| 669 | Set the number of significant characters in tag names. |
| 670 | t\bta\bag\bgs\bs,\b, t\bta\bag\bg [\b[t\bta\bag\bgs\bs /\b/v\bva\bar\br/\b/d\bdb\bb/\b/l\bli\bib\bbc\bc.\b.t\bta\bag\bgs\bs /\b/s\bsy\bys\bs/\b/k\bke\ber\brn\bn/\b/t\bta\bag\bgs\bs]\b] |
| 671 | Set the list of tags files. |
| 672 | t\bte\ber\brm\bm,\b, t\btt\bty\byt\bty\byp\bpe\be,\b, t\btt\bty\by [\b[e\ben\bnv\bvi\bir\bro\bon\bnm\bme\ben\bnt\bt v\bva\bar\bri\bia\bab\bbl\ble\be T\bTE\bER\bRM\bM]\b] |
| 673 | Set the terminal type. |
| 674 | t\bte\ber\brs\bse\be [\b[o\bof\bff\bf]\b] |
| 675 | This option has historically made editor messages less verbose. It |
| 676 | has no effect in this implementation. |
| 677 | t\bti\bil\bld\bde\beo\bop\bp |
| 678 | Modify the ~\b~ command to take an associated motion. |
| 679 | t\bti\bim\bme\beo\bou\but\bt,\b, t\bto\bo [\b[o\bon\bn]\b] |
| 680 | Time out on keys which may be mapped. |
| 681 | t\btt\bty\byw\bwe\ber\bra\bas\bse\be [\b[o\bof\bff\bf]\b] |
| 682 | V\bVi\bi only. Select an alternate erase algorithm. |
| 683 | v\bve\ber\brb\bbo\bos\bse\be [\b[o\bof\bff\bf]\b] |
| 684 | only. Display an error message for every error. |
| 685 | w\bw3\b30\b00\b0 [\b[n\bno\bo d\bde\bef\bfa\bau\bul\blt\bt]\b] |
| 686 | V\bVi\bi only. Set the window size if the baud rate is less than 1200 |
| 687 | baud. |
| 688 | w\bw1\b12\b20\b00\b0 [\b[n\bno\bo d\bde\bef\bfa\bau\bul\blt\bt]\b] |
| 689 | V\bVi\bi only. Set the window size if the baud rate is equal to 1200 |
| 690 | baud. |
| 691 | w\bw9\b96\b60\b00\b0 [\b[n\bno\bo d\bde\bef\bfa\bau\bul\blt\bt]\b] |
| 692 | V\bVi\bi only. Set the window size if the baud rate is greater than 1200 |
| 693 | baud. |
| 694 | w\bwa\bar\brn\bn [\b[o\bon\bn]\b] |
| 695 | E\bEx\bx only. This option causes a warning message to the terminal if |
| 696 | the file has been modified, since it was last written, before a !\b! |
| 697 | command. |
| 698 | w\bwi\bin\bnd\bdo\bow\bw,\b, w\bw,\b, w\bwi\bi [\b[e\ben\bnv\bvi\bir\bro\bon\bnm\bme\ben\bnt\bt v\bva\bar\bri\bia\bab\bbl\ble\be L\bLI\bIN\bNE\bES\bS]\b] |
| 699 | Set the window size for the screen. |
| 700 | w\bwr\bra\bap\bpl\ble\ben\bn,\b, w\bwl\bl [\b[0\b0]\b] |
| 701 | V\bVi\bi only. Break lines automatically, the specified number of |
| 702 | columns from the left-hand margin. |
| 703 | w\bwr\bra\bap\bpm\bma\bar\brg\bgi\bin\bn,\b, w\bwm\bm [\b[0\b0]\b] |
| 704 | V\bVi\bi only. Break lines automatically, the specified number of |
| 705 | columns from the right-hand margin. |
| 706 | w\bwr\bra\bap\bps\bsc\bca\ban\bn,\b, w\bws\bs [\b[o\bon\bn]\b] |
| 707 | Set searches to wrap around the end or beginning of the file. |
| 708 | w\bwr\bri\bit\bte\bea\ban\bny\by,\b, w\bwa\ba [\b[o\bof\bff\bf]\b] |
| 709 | Turn off file-overwriting checks. |
| 710 | |
| 711 | E\bEN\bNV\bVI\bIR\bRO\bON\bNM\bME\bEN\bNT\bTA\bAL\bL V\bVA\bAR\bRI\bIA\bAB\bBL\bLE\bES\bS |
| 712 | COLUMNS The number of columns on the screen. This value overrides any |
| 713 | system or terminal specific values. If the COLUMNS environ- |
| 714 | mental variable is not set when e\bex\bx/\b/v\bvi\bi runs, or the c\bco\bol\blu\bum\bmn\bns\bs op- |
| 715 | tion is explicitly reset by the user, e\bex\bx/\b/v\bvi\bi enters the value |
| 716 | into the environment. |
| 717 | EXINIT A list of e\bex\bx startup commands, read if the variable NEXINIT is |
| 718 | not set. |
| 719 | HOME The user's home directory, used as the initial directory path |
| 720 | for the startup _\b$_\bH_\bO_\bM_\bE_\b/_\b._\bn_\be_\bx_\br_\bc and _\b$_\bH_\bO_\bM_\bE_\b/_\b._\be_\bx_\br_\bc files. This val- |
| 721 | ue is also used as the default directory for the v\bvi\bi c\bcd\bd com- |
| 722 | mand. |
| 723 | LINES The number of rows on the screen. This value overrides any |
| 724 | system or terminal specific values. If the LINES environmen- |
| 725 | tal variable is not set when e\bex\bx/\b/v\bvi\bi runs, or the l\bli\bin\bne\bes\bs option |
| 726 | is explicitly reset by the user, e\bex\bx/\b/v\bvi\bi enters the value into |
| 727 | the environment. |
| 728 | NEXINIT A list of e\bex\bx startup commands. |
| 729 | SHELL The user's shell of choice (see also the s\bsh\bhe\bel\bll\bl option). |
| 730 | TERM The user's terminal type. The default is the type |
| 731 | ``unknown''. If the TERM environmental variable is not set |
| 732 | when e\bex\bx/\b/v\bvi\bi runs, or the t\bte\ber\brm\bm option is explicitly reset by the |
| 733 | user, e\bex\bx/\b/v\bvi\bi enters the value into the environment. |
| 734 | TMPDIR The location used to stored temporary files (see also the |
| 735 | d\bdi\bir\bre\bec\bct\bto\bor\bry\by option). |
| 736 | |
| 737 | A\bAS\bSY\bYN\bNC\bCH\bHR\bRO\bON\bNO\bOU\bUS\bS E\bEV\bVE\bEN\bNT\bTS\bS |
| 738 | SIGALRM V\bVi\bi/\b/e\bex\bx uses this signal for periodic backups of file modifica- |
| 739 | tions and to display ``busy'' messages when operations are |
| 740 | likely to take a long time. |
| 741 | SIGHUP |
| 742 | SIGTERM If the current buffer has changed since it was last written |
| 743 | in its entirety, the editor attempts to save the modified |
| 744 | file so it can be later recovered. See the v\bvi\bi/\b/e\bex\bx Reference |
| 745 | manual section entitled ``Recovery'' for more information. |
| 746 | SIGINT When an interrupt occurs, the current operation is halted, |
| 747 | and the editor returns to the command level. If interrupted |
| 748 | during text input, the text already input is resolved into |
| 749 | the file as if the text input had been normally terminated. |
| 750 | SIGWINCH The screen is resized. See the v\bvi\bi/\b/e\bex\bx Reference manual sec- |
| 751 | tion entitled ``Sizing the Screen'' for more information. |
| 752 | SIGCONT |
| 753 | SIGQUIT |
| 754 | SIGTSTP V\bVi\bi/\b/e\bex\bx ignores these signals. |
| 755 | |
| 756 | B\bBU\bUG\bGS\bS |
| 757 | See the file _\bn_\bv_\bi_\b/_\bd_\bo_\bc_\bs_\b/_\bb_\bu_\bg_\bs_\b._\bc_\bu_\br_\br_\be_\bn_\bt for a list of the known bugs in this |
| 758 | version. |
| 759 | |
| 760 | F\bFI\bIL\bLE\bES\bS |
| 761 | /bin/sh The default user shell. |
| 762 | /etc/vi.exrc System-wide vi startup file. |
| 763 | /tmp Temporary file directory. |
| 764 | /var/tmp/vi.recover The default recovery file directory. |
| 765 | $HOME/.nexrc 1st choice for user's home directory startup file. |
| 766 | $HOME/.exrc 2nd choice for user's home directory startup file. |
| 767 | .nexrc 1st choice for local directory startup file. |
| 768 | .exrc 2nd choice for local directory startup file. |
| 769 | |
| 770 | S\bSE\bEE\bE A\bAL\bLS\bSO\bO |
| 771 | ctags(1), more(1), curses(3), dbopen(3) |
| 772 | |
| 773 | The ``Vi Quick Reference'' card. |
| 774 | |
| 775 | ``An Introduction to Display Editing with Vi'', found in the ``UNIX |
| 776 | User's Manual Supplementary Documents'' section of both the 4.3BSD and |
| 777 | 4.4BSD manual sets. This document is the closest thing available to an |
| 778 | introduction to the v\bvi\bi screen editor. |
| 779 | |
| 780 | ``Ex Reference Manual (Version 3.7)'', found in the ``UNIX User's Manual |
| 781 | Supplementary Documents'' section of both the 4.3BSD and 4.4BSD manual |
| 782 | sets. This document is the final reference for the e\bex\bx editor, as dis- |
| 783 | tributed in most historic 4BSD and System V systems. |
| 784 | |
| 785 | ``Edit: A tutorial'', found in the ``UNIX User's Manual Supplementary |
| 786 | Documents'' section of the 4.3BSD manual set. This document is an intro- |
| 787 | duction to a simple version of the e\bex\bx screen editor. |
| 788 | |
| 789 | ``Ex/Vi Reference Manual'', found in the ``UNIX User's Manual |
| 790 | Supplementary Documents'' section of the 4.4BSD manual set. This docu- |
| 791 | ment is the final reference for the n\bne\bex\bx/\b/n\bnv\bvi\bi text editors, as distributed |
| 792 | in 4.4BSD and 4.4BSD-Lite. |
| 793 | |
| 794 | R\bRo\bof\bff\bf source for all of these documents is distributed with n\bne\bex\bx/\b/n\bnv\bvi\bi in the |
| 795 | _\bn_\bv_\bi_\b/_\bU_\bS_\bD_\b._\bd_\bo_\bc directory of the n\bne\bex\bx/\b/n\bnv\bvi\bi source code. |
| 796 | |
| 797 | The files ``autowrite'', ``input'', ``quoting'', and ``structures'', |
| 798 | found in the _\bn_\bv_\bi_\b/_\bd_\bo_\bc_\bs_\b/_\bi_\bn_\bt_\be_\br_\bn_\ba_\bl_\bs directory of the n\bne\bex\bx/\b/n\bnv\bvi\bi source code. |
| 799 | |
| 800 | H\bHI\bIS\bST\bTO\bOR\bRY\bY |
| 801 | The n\bne\bex\bx/\b/n\bnv\bvi\bi replacements for the e\bex\bx/\b/v\bvi\bi editor first appeared in 4.4BSD. |
| 802 | |
| 803 | S\bST\bTA\bAN\bND\bDA\bAR\bRD\bDS\bS |
| 804 | N\bNe\bex\bx/\b/n\bnv\bvi\bi is close to IEEE Std1003.2 (``POSIX''). That document differs |
| 805 | from historical e\bex\bx/\b/v\bvi\bi practice in several places; there are changes to be |
| 806 | made on both sides. |
| 807 | |
| 808 | 4.4BSD November 20, 1994 13 |