|
|
1.1 ! root 1: ! 2: Elvis 1.4 OPTIONS Page 5-1 ! 3: ! 4: ! 5: E5. OPTIONSF ! 6: ! 7: Options may be set or examined via the colon command "set". The ! 8: values of options will affect the operation of later commands. ! 9: ! 10: For convenience, options have both a long descriptive name and a ! 11: short name which is easy to type. You may use either name ! 12: interchangably. I like the short names, myself. ! 13: ! 14: -1long name short type default meaning -0 ! 15: autoindent ai Bool noai auto-indent during input ! 16: autoprint ap Bool ap in EX, print the current line ! 17: autowrite aw Bool noaw auto-write when switching files ! 18: charattr ca Bool noca interpret \fX sequences? ! 19: cc cc Str cc="cc -c" name of the C compiler ! 20: columns co Num co=80 width of the screen ! 21: digraph dig Bool nodig recognize digraphs? ! 22: directory dir Str dir="/usr/tmp" where tmp files are kept ! 23: edcompatible ed Bool noed remember ":s//" options ! 24: errorbells eb Bool eb ring bell on error ! 25: exrefresh er Bool er write lines indiviually in EX ! 26: flipcase fc Str fc="" non-ASCII chars flipped by ~ ! 27: hideformat hf Bool hf hide text formatter commands ! 28: ignorecase ic Bool noic upper/lowercase match in search ! 29: inputmode im Bool noim start vi in insert mode? ! 30: keytime kt Num kt=2 timeout for mapped key entry ! 31: keywordprg kp Str kp="ref" full pathname of shift-K prog ! 32: lines ln Num ln=25 number of lines on the screen ! 33: list li Bool noli display lines in "list" mode ! 34: magic ma Bool ma use regular expression in search ! 35: make mk Str mk="make" name of the "make" program ! 36: modeline ml Bool noml are modelines processed? ! 37: paragraphs pa Str pa="PPppIPLPQP" names of "paragraph" nroff cmd ! 38: readonly ro Bool noro prevent overwriting of orig file ! 39: report re Num re=5 report when 5 or more changes ! 40: scroll sc Num sc=12 scroll amount for ^U and ^D ! 41: sections se Str se="NHSHSSSEse" names of "section" nroff cmd ! 42: shell sh Str sh="/bin/sh" full pathname of the shell ! 43: showmatch sm Bool nosm show matching ()[]{} ! 44: showmode smd Bool nosmd say when we're in input mode ! 45: shiftwidth sw Num sw=8 shift amount for < and > ! 46: sidescroll ss Num ss=8 amount of sideways scrolling ! 47: sync sy Bool nosy call sync() often ! 48: tabstop ts Num ts=8 width of tab characters ! 49: term te Str te="$TERM" name of the termcap entry ! 50: vbell vb Bool vb use visible alternative to bell ! 51: warn wa Bool wa warn for ! if file modified ! 52: wrapmargin wm Num wm=0 wrap long lines in input mode ! 53: wrapscan ws Bool ws at EOF, searches wrap to line 1 ! 54: ! 55: There are three types of options: Bool, string, and numeric. ! 56: Boolean options are made TRUE by giving the name of the option as ! 57: an argument to the "set" command; they are made FALSE by prefixing ! 58: the name with "no". For example, "set autoindent" makes the ! 59: autoindent option TRUE, and "set noautoindent" makes it FALSE. ! 60: ! 61: ! 62: ! 63: ! 64: ! 65: ! 66: ! 67: ! 68: Elvis 1.4 OPTIONS Page 5-2 ! 69: ! 70: ! 71: To change the value of a string or numeric option, pass the ! 72: "set" command the name of the option, followed by an "=" sign and ! 73: the option's new value. For example, "set tabstop=8" will give the ! 74: tabstop option a value of 8. For string options, you may enclose ! 75: the new value in quotes. ! 76: ! 77: ! 78: E5.1 AutoIndentF ! 79: ! 80: During input mode, the autoindent option will cause each added ! 81: line to begin with the same amount of leading whitespace as the ! 82: line above it. Without autoindent, added lines are initially ! 83: empty. ! 84: ! 85: ! 86: E5.2 AutoPrintF ! 87: ! 88: This option only affects EX mode. If the autoprint option on, ! 89: and either the cursor has moved to a different line or the previous ! 90: command modified the file, then Elvis will print the current line. ! 91: ! 92: ! 93: E5.3 AutoWriteF ! 94: ! 95: When you're editing one file and decide to switch to another - ! 96: via the :tag command, or :next command, perhaps - if your current ! 97: file has been modified, then Elvis will normally print an error ! 98: message and refuse to switch. ! 99: ! 100: However, if the autowrite option is on, then Elvis will write ! 101: the modified version of the current file and successfully switch to ! 102: the new file. ! 103: ! 104: ! 105: E5.4 CCF ! 106: ! 107: The :cc command runs the C compiler. This option should be set ! 108: to the name of your compiler. ! 109: ! 110: ! 111: E5.5 CharAttrF ! 112: ! 113: Many text formatting programs allow you to designate portions of ! 114: your text to be underlined, italicized, or boldface by embedding ! 115: the special strings \fU, \fI, and \fB in your text. The special ! 116: string \fR marks the end of underlined or boldface text. ! 117: ! 118: Elvis normally treats those special strings just like any other ! 119: text. ! 120: ! 121: However, if the charattr option is on, then Elvis will interpret ! 122: those special strings correctly, to display underlined or boldface ! 123: text on the screen. (This only works, of course, if your terminal ! 124: can display underlined and boldface, and if the TERMCAP entry says ! 125: how to do it.) ! 126: ! 127: ! 128: ! 129: ! 130: ! 131: ! 132: ! 133: ! 134: Elvis 1.4 OPTIONS Page 5-3 ! 135: ! 136: ! 137: E5.6 COlumnsF ! 138: ! 139: This is a "read only" option. You can't change its value, but ! 140: you can have Elvis print it. It shows how wide your screen is. ! 141: ! 142: ! 143: E5.7 DIGraphF ! 144: ! 145: This option is used to enable/disable recognition of digraphs. ! 146: The default value is nodigraph, which means that digraphs will not ! 147: be recognized. ! 148: ! 149: ! 150: E5.8 DIRectoryF ! 151: ! 152: Elvis stores text in temporary files. This option allows you to ! 153: control which directory those temporary files will appear in. The ! 154: default is /usr/tmp. ! 155: ! 156: This option can only be set in a .exrc file; after that, elvis ! 157: will have already started making temporary files in some other ! 158: directory, so it would be too late. ! 159: ! 160: ! 161: E5.9 EDcompatibleF ! 162: ! 163: This option affects the behaviour of the ! 164: ":s/regexp/text/options" command. It is normally off (:se noed) ! 165: which causes all of the substitution options to be off unless ! 166: explicitly given. ! 167: ! 168: However, with edcompatible on (:se ed), the substitution command ! 169: remembers which options you used last time. Those same options ! 170: will continue to be used until you change them. In edcompatible ! 171: mode, when you explicitly give the name of a substitution option, ! 172: you will toggle the state of that option. ! 173: ! 174: This all seems very strange to me, but its implementation was ! 175: almost free when I added the ":&" command to repeat the previous ! 176: substitution, so there it is. ! 177: ! 178: ! 179: E5.10 ErrorBellsF ! 180: ! 181: Elvis normally rings a bell when you do something wrong. This ! 182: option lets you disable the bell. ! 183: ! 184: ! 185: E5.11 ExRefreshF ! 186: ! 187: The EX mode of Elvis writes many lines to the screen. You can ! 188: make Elvis either write each line to the screen separately, or save ! 189: up many lines and write them all at once. ! 190: ! 191: The exrefresh option is normally on, so each line is written to ! 192: the screen separately. ! 193: ! 194: ! 195: ! 196: ! 197: ! 198: ! 199: ! 200: Elvis 1.4 OPTIONS Page 5-4 ! 201: ! 202: ! 203: You may wish to turn the exrefresh option off (:se noer) if the ! 204: "write" system call is costly on your machine, or if you're using a ! 205: windowing environment. (Windowing environments scroll text a lot ! 206: faster when you write many lines at once.) ! 207: ! 208: This option has no effect in visual command mode or input mode. ! 209: ! 210: ! 211: E5.12 FlipCaseF ! 212: ! 213: The flipcase option allows you to control how the non-ASCII ! 214: characters are altered by the "~" command. ! 215: ! 216: The string is divided into pairs of characters. When "~" is ! 217: applied to a non-ASCII character, Elvis looks up the character in ! 218: the flipcase string to see which pair it's in, and replaces it by ! 219: the other character of the pair. ! 220: ! 221: ! 222: E5.13 HideFormatF ! 223: ! 224: Many text formatters require you to embed format commands in ! 225: your text, on lines that start with a "." character. Elvis ! 226: normally displays these lines like any other text, but if the ! 227: hideformat option is on, then format lines are displayed as blank ! 228: lines. ! 229: ! 230: ! 231: E5.14 IgnoreCaseF ! 232: ! 233: Normally, when Elvis searches for text, it treats uppercase ! 234: letters as being different for lowercase letters. ! 235: ! 236: When the ignorecase option is on, uppercase and lowercase are ! 237: treated as equal. ! 238: ! 239: ! 240: E5.15 InputModeF ! 241: ! 242: This option allows you to have Elvis start up in insert mode. ! 243: You can still exit insert mode at any time by hitting the ESC key, ! 244: as usual. Usually, this option would be set in your ".exrc" file. ! 245: ! 246: ! 247: E5.16 KeyTimeF ! 248: ! 249: The arrow keys of most terminals send a multi-character ! 250: sequence. It takes a measurable amount of time for these sequences ! 251: to be transmitted. The keytime option allows you to control the ! 252: maximum amount of time to allow for an arrow key (or other mapped ! 253: key) to be received in full. ! 254: ! 255: The default keytime value is 2. Because of the way UNIX ! 256: timekeeping works, the actual amount of time allowed will vary ! 257: slightly, but it will always be between 1 and 2 seconds. ! 258: ! 259: ! 260: ! 261: ! 262: ! 263: ! 264: ! 265: ! 266: Elvis 1.4 OPTIONS Page 5-5 ! 267: ! 268: ! 269: If you set keytime to 1, then the actual amount of time allowed ! 270: will be between 0 and 1 second. This will generally make the ! 271: keyboard's response be a little faster (mostly for the ESC key), ! 272: but on those occasions where the time allowed happens to be closer ! 273: to 0 than 1 second, Elvis may fail to allow enough time for an ! 274: arrow key's sequence to be received fully. Ugh. ! 275: ! 276: As a special case, you can set keytime to 0 to disable this time ! 277: limit stuff altogether. The big problem here is: If your arrow ! 278: keys' sequences start with an ESC, then every time you hit your ESC ! 279: key Elvis will wait... and wait... to see if maybe that ESC was ! 280: part of an arrow key's sequence. ! 281: ! 282: NOTE: this option is a generalization of the timeout option of ! 283: the real vi. ! 284: ! 285: ! 286: E5.17 KeywordPrgF ! 287: ! 288: Elvis has a special keyword lookup feature. You move the cursor ! 289: onto a word, and hit shift-K, and Elvis uses another program to ! 290: look up the word and display information about it. ! 291: ! 292: This option says which program gets run. ! 293: ! 294: The default value of this option is "ref", which is a program ! 295: that looks up the definition of a function in C. It looks up the ! 296: function name in a file called "refs" which is created by ctags. ! 297: ! 298: You can subtitute other programs, such as an English dictionary ! 299: program or the online manual. Elvis runs the program, using the ! 300: keyword as its only argument. The program should write information ! 301: to stdout. The program's exit status should be 0, unless you want ! 302: Elvis to print "<<< failed >>>". ! 303: ! 304: ! 305: E5.18 LiNesF ! 306: ! 307: This "read only" option shows how many lines you screen has. ! 308: ! 309: ! 310: E5.19 LIstF ! 311: ! 312: In nolist mode (the default), elvis displays text in a "normal" ! 313: manner -- with tabs expanded to an appropriate number of spaces, ! 314: etc. ! 315: ! 316: However, sometimes it is useful to have tab characters displayed ! 317: differently. In list mode, tabs are displayed as "^I", and a "$" ! 318: is displayed at the end of each line. ! 319: ! 320: ! 321: ! 322: ! 323: ! 324: ! 325: ! 326: ! 327: ! 328: ! 329: ! 330: ! 331: ! 332: Elvis 1.4 OPTIONS Page 5-6 ! 333: ! 334: ! 335: E5.20 MAgicF ! 336: ! 337: The search mechanism in Elvis can accept "regular expressions" ! 338: -- strings in which certain characters have special meaning. ! 339: ! 340: The magic option is normally on, which causes these characters ! 341: to be treated specially. ! 342: ! 343: If you turn the magic option off (:se noma), then all characters ! 344: except ^ and $ are treated literally. ^ and $ retain their special ! 345: meanings regardless of the setting of magic. ! 346: ! 347: ! 348: E5.21 MaKeF ! 349: ! 350: The :make command runs your "make" program. This option defines ! 351: the name of your "make" program. ! 352: ! 353: ! 354: E5.22 ModeLineF ! 355: ! 356: Elvis supports modelines. Modelines are lines near the ! 357: beginning or end of your text file which contain "ex:yowza:", where ! 358: "yowza" is any EX command. A typical "yowza" would be something ! 359: like "set ts=4 ca kp=spell". ! 360: ! 361: Normally these lines are ignored, for security reasons, but if ! 362: you have "set modeline" in your .exrc file then "yowza" is ! 363: executed. ! 364: ! 365: ! 366: E5.23 PAragraphsF ! 367: ! 368: The { and } commands move the cursor forward or backward in ! 369: increments of one paragraph. Paragraphs may be separated by blank ! 370: lines, or by a "dot" command of a text formatter. Different text ! 371: formatters use different "dot" commands. This option allows you to ! 372: configure Elvis to work with your text formatter. ! 373: ! 374: It is assumed that your formatter uses commands that start with ! 375: a "." character at the front of a line, and then have a one- or ! 376: two-character command name. ! 377: ! 378: The value of the paragraphs option is a string in which each ! 379: pair of characters is one possible form of your text formatter's ! 380: paragraph command. ! 381: ! 382: ! 383: E5.24 ReadOnlyF ! 384: ! 385: Normally, Elvis will let you write back any file to which you ! 386: have write permission. If you don't have write permission, then ! 387: you can only write the changed version of the file to a -1different-0 ! 388: file. ! 389: ! 390: ! 391: ! 392: ! 393: ! 394: ! 395: ! 396: ! 397: ! 398: Elvis 1.4 OPTIONS Page 5-7 ! 399: ! 400: ! 401: If you set the readonly option, then Elvis will pretend you ! 402: don't have write permission to -1any-0 file you edit. It is useful ! 403: when you really only mean to use Elvis to look at a file, not to ! 404: change it. This way you can't change it accidentally. ! 405: ! 406: This option is normally off, unless you use the "view" alias of ! 407: Elvis. "View" is like "vi" except that the readonly option is on. ! 408: ! 409: ! 410: E5.25 REportF ! 411: ! 412: Commands in Elvis may affect many lines. For commands that ! 413: affect a lot of lines, Elvis will output a message saying what was ! 414: done and how many lines were affected. This option allows you to ! 415: define what "a lot of lines" means. The default is 5, so any ! 416: command which affects 5 or more lines will cause a message to be ! 417: shown. ! 418: ! 419: ! 420: E5.26 SCrollF ! 421: ! 422: The ^U and ^D keys normally scroll backward or forward by half a ! 423: screenful, but this is adjustable. The value of this option says ! 424: how many lines those keys should scroll by. ! 425: ! 426: ! 427: E5.27 SEctionsF ! 428: ! 429: The [[ and ]] commands move the cursor backward or forward in ! 430: increments of 1 section. Sections may be delimited by a { ! 431: character in column 1 (which is useful for C source code) or by ! 432: means of a text formatter's "dot" commands. ! 433: ! 434: This option allows you to configure Elvis to work with your text ! 435: formatter's "section" command, in exectly the same way that the ! 436: paragraphs option makes it work with the formatter's "paragraphs" ! 437: command. ! 438: ! 439: ! 440: E5.28 SHellF ! 441: ! 442: When Elvis forks a shell (perhaps for the :! or :shell ! 443: commands) this is the program that is uses as a shell. This is ! 444: "/bin/sh" by default, unless you have set the SHELL (or COMSPEC, ! 445: for MS-DOS) environment variable, it which case the default value ! 446: is copied from the environment. ! 447: ! 448: ! 449: E5.29 ShiftWidthF ! 450: ! 451: The < and > commands shift text left or right by some uniform ! 452: number of columns. The shiftwidth option defines that "uniform ! 453: number". The default is 8. ! 454: ! 455: ! 456: ! 457: ! 458: ! 459: ! 460: ! 461: ! 462: ! 463: ! 464: Elvis 1.4 OPTIONS Page 5-8 ! 465: ! 466: ! 467: E5.30 ShowMatchF ! 468: ! 469: With showmatch set, in input mode every time you hit one of )}], ! 470: Elvis will momentarily move the cursor to the matching ({[. ! 471: ! 472: ! 473: E5.31 ShowMoDeF ! 474: ! 475: In visual mode, it is easy to forget whether you're in the ! 476: visual command mode or input/replace mode. Normally, the showmode ! 477: option is off, and you haven't a clue as to which mode you're in. ! 478: If you turn the showmode option on, though, a little message will ! 479: appear in the lower right-hand corner of your screen, telling you ! 480: which mode you're in. ! 481: ! 482: ! 483: E5.32 SideScrollF ! 484: ! 485: For long lines, Elvis scrolls sideways. (This is different from ! 486: the real vi, which wraps a single long line onto several rows of ! 487: the screen.) ! 488: ! 489: To minimize the number of scrolls needed, Elvis moves the screen ! 490: sideways by several characters at a time. The value of this option ! 491: says how many characters' widths to scroll at a time. ! 492: ! 493: Generally, the faster your screen can be redrawn, the lower the ! 494: value you will want in this option. ! 495: ! 496: ! 497: E5.33 SYncF ! 498: ! 499: If the system crashes during an edit session, then most of your ! 500: work can be recovered from the temporary file that elvis uses to ! 501: store changes. However, sometimes the OS will not copy changes to ! 502: the hard disk immediately, so recovery might not be possible. The ! 503: [no]sync option lets you control this. ! 504: ! 505: In nosync mode (which is the default, for UNIX), elvis lets the ! 506: operating system control when data is written to the disk. This is ! 507: generally faster. ! 508: ! 509: In sync mode (which is the default, for MS-DOS), elvis forces ! 510: all changes out to disk every time you make a change. This is ! 511: generally safer, but slower. It can also be a rather rude thing to ! 512: do on a multi-user system. ! 513: ! 514: ! 515: E5.34 TabStopF ! 516: ! 517: Tab characters are normally 8 characters wide, but you can ! 518: change their widths by means of this option. ! 519: ! 520: ! 521: ! 522: ! 523: ! 524: ! 525: ! 526: ! 527: ! 528: ! 529: ! 530: Elvis 1.4 OPTIONS Page 5-9 ! 531: ! 532: ! 533: E5.35 TErmF ! 534: ! 535: This "read only" option shows the name of the termcap entry that ! 536: Elvis is using for your terminal. ! 537: ! 538: ! 539: E5.36 VBellF ! 540: ! 541: If your termcap entry describes a visible alternative to ringing ! 542: your terminal's bell, then this option will say whether the visible ! 543: version gets used or not. Normally it will be. ! 544: ! 545: If your termcap does NOT include a visible bell capability, then ! 546: the vbell option will be off, and you can't turn it on. ! 547: ! 548: ! 549: E5.37 WArnF ! 550: ! 551: If you have modified a file but not yet written it back to disk, ! 552: then Elvis will normally print a warning before executing a ":!cmd" ! 553: command. However, in nowarn mode, this warning is not given. ! 554: ! 555: Elvis also normally prints a message after a successful search ! 556: that wrapped at EOF. The [no]warn option can also disable this ! 557: warning. ! 558: ! 559: ! 560: E5.38 WrapMarginF ! 561: ! 562: Normally (with wrapmargin=0) Elvis will let you type in ! 563: extremely long lines, if you wish. ! 564: ! 565: However, with warpmargin set to something other that 0 ! 566: (wrapmargin=10 is nice), Elvis will automatically cause long lines ! 567: to be "wrapped" on a word break for lines longer than wrapmargin's ! 568: setting. ! 569: ! 570: ! 571: E5.39 WrapScanF ! 572: ! 573: Normally, when you search for something, Elvis will find it no ! 574: matter where it is in the file. Elvis starts at the cursor ! 575: position, and searches forward. If Elvis hits EOF without finding ! 576: what you're looking for, then it wraps around to continue searching ! 577: from line 1. ! 578: ! 579: If you turn off the wrapscan option (:se nows), then when Elvis ! 580: hits EOF during a search, it will stop and say so. ! 581: ! 582: ! 583: ! 584: ! 585: ! 586: ! 587: ! 588: ! 589: ! 590: ! 591: ! 592: ! 593: ! 594:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.