Ex
来自 ChinaUnix Wiki
Linux命令:ex
功能说明:在Ex模式下启动vim文本编辑器。
ex执行效果如同vi -E,使用语法及参数可参照vi指令,如要从Ex模式回到普通模式,则在vim中输入:vi或:visual即可。
英文版本,欢迎翻译:
ABOUT EX
Line-editor mode of the vi text editor.
SYNTAX
ex [ -| -s ] [ -l ] [ -L ] [ -R ] [ -r [file ] ] [ -t tag ] [ -v ] [ -V ] [ -x ] [ -wn ] [ -C] [+command | -c command ] file
- | -s Suppress all interactive user feedback. This is useful when processing editor scripts. -l Set up for editing LISP programs. -L List the name of all files saved as the result of an editor or system crash. -R Readonly mode; the readonly flag is set, preventing accidental overwriting of the file. -r file Edit file after an editor or system crash. (Recovers the version of file that was in the buffer when the crash occurred.) -t tag Edit the file containing the tag and position the editor at its definition. -v Start up in display editing state using vi . You can achieve the same effect by simply typing the vi command itself. -V Verbose. When ex commands are read by means of standard input, the input will be echoed to standard error. This may be useful when processing ex commands within shell scripts. -x Encryption option. Simulates the X command and prompts the user for a key. This key is used to encrypt and decrypt text using the algorithm of the crypt command. The X command makes an educated guess to determine whether text read in is encrypted or not. The temporary buffer file is encrypted also, using a transformed version of the key typed in for the -x option. -wn Set the default window size to n. This is useful when using the editor over a slow speed line. -C Encryption option. Same as the -x option, except simulates the C command. The C command is like the X command, except that all text read in is assumed to have been encrypted. +command | -c command Begin editing by executing the specified editor command (usually a search or positioning command). file A path name of a file to be edited.
EXAMPLES
ex myfile.txt - edits the file myfile.txt.
vim
