The three most common ways of starting a vi session are:
vi file vi +n file vi +/ pattern file
You can open file for editing, optionally at line n or at the first line matching pattern. If no file is specified, vi opens with an empty buffer. The command-line options that can be used with vi are as follows (vim-only options are labeled):
Copyright © 2003 O'Reilly & Associates. All rights reserved.