vi, ex, vim, vile, nvi, elvis

2009 Mar 01


Command
Line
Reference
Links
vi
commands
ex
commands
Indentation Initialization Options Regular
Expressions

vi and ex perform the following initialization steps:
  1. If the EXINIT environment variable exists, execute the commands it contains. Separate multiple commands by a pipe symbol.
  2. If EXINIT does not exist, look for the file $HOME/.exrc and if its exists, read and execute it.
  3. If either EXINIT or $HOME/.exrc turns on the exrc option, read and execute the file ./.exrc if it exists.
  4. Execute search or goto commands given with +/pattern or +n command-line options (POSIX: -c option).

Command Line
Command Meaning
vi file Use vi to edit file
vi file1 file2 ... Use vi to edit file1 file2 ... sequentialy
view file
vi -R file
Use vi to open file readonly
vi -r file Recover file and recent edits from a crash
vi -t tag file Look up tag and start editing at its definition
vi -w n ... Set window size to n (usefull over slow connection)
vi + file Use vi to edit file, open at last line
vi +n file Use vi to edit file, open at line n
vi +/pattern file Use vi to edit file, open at pattern
vi -c command file Open file, execute command before edit (POSIX)
ex file Use ex to edit file
ex file < script Use ex to edit file, taking commands from script
ex -s file < script Use ex to edit file, taking commands from script;
suppress messages and prompts (POSIX)

Reference Links
Editor Author Email Source
vi http://www.pantz.org/editors/vi/vireference.shtml
elvis Steve Kirkendall kirkenda@cs.pdx.edu ftp://ftp.cs.pdx.edu/pub/elvis/README.html
vim Bram Moolenaar Bram@vim.org http://www.vim.org
vile Kevin Buettner
Tom Dickey
Paul Fox
vile-bugs@foxharp.borton.ma.us http://www.clark.net/pub/dickey/vile/vile.html

2005-2009