+[num]
Start editing at line number num, or the last line of the file if num is omitted.
+/pattern
Start editing at the first line matching pattern. (For ex, fails if nowrapscan is set in your .exrc startup file, since ex starts editing at the last line of a file.)
-b
Edit the file in binary mode. {vim}
-c command
Run the given ex command upon startup. Only one -c option is permitted for vi; vim accepts up to 10. An older form of this option, +command, is still supported.
--cmd command
Like -c, but execute the command before any resource files are read. {vim}
-C
vim: Start the editor in vi-compatible mode.
-d
Run in diff mode. Can also be invoked by running the command vimdiff. {vim}
-D
Debugging mode for use with scripts. {vim}
-e
Run as ex (line editing rather than full-screen mode).
-h
Print help message, then exit. {vim}
-i file
Use the specified file instead of the default (~/.viminfo) to save or restore vim's state. {vim}
-l
Enter Lisp mode for running Lisp programs (not supported in all versions).
-L
List files that were saved due to an aborted editor session or system crash (not supported in all versions). For vim, this option is the same as -r.
-m
Start the editor with the write option turned off so the user cannot write to files. {vim}
-M
Do not allow text in files to be modified. {vim}
-n
Do not use a swapfile; record changes in memory only. {vim}
--noplugin
Do not load any plug-ins. {vim}
-N
Run vim in a non-vi-compatible mode. {vim}
-o[num]
Start vim with num open windows. The default is to open one window for each file. {vim}
-O[num]
Start vim with num open windows arranged horizontally (split vertically) on the screen. {vim}
-r [file]
Recovery mode; recover and resume editing on file after an aborted editor session or system crash. Without file, list files available for recovery.
-R
Edit files read-only.
-s
Silent; do not display prompts. Useful when running a script. This behavior also can be set through the older - option. For vim, only applies when used together with -e.
-s scriptfile
Read and execute commands given in the specified scriptfile as if they were typed in from the keyboard. {vim}
-S commandfile
Read and execute commands given in commandfile after loading any files for editing specified on the command line. Shorthand for the option vim -c 'source commandfile'. {vim}
-t tag
Edit the file containing tag and position the cursor at its definition. (See ctags in Chapter 3 for more information.)
-T type
Set the terminal type. This value overrides the $TERM environment variable. {vim}
-u file
Read configuration information from the specified resource file instead of default .vimrc resource file. If the file argument is NONE, vim will read no resource files, load no plug-ins, and run in compatible mode. If the argument is NORC, it will read no resource files, but it will load plug-ins. {vim}
-v
Run in full-screen mode (default for vi).
--version
Print version information, then exit. {vim}
-V[num]
Verbose mode; print messages about what options are being set and what files are being read or written. You can set a level of verbosity to increase or decrease the number of messages received. The default value is 10 for high verbosity. {vim}
-w rows
Set the window size so rows lines at a time are displayed; useful when editing over a slow dial-up line (or long distance Internet connection). Older versions of vi do not permit a space between the option and its argument. vim does not support this option.
-W scriptfile
Write all typed commands from the current session to the specified scriptfile. The file created can be used with the -s command. {vim}
-x
Prompt for a key that will be used to try to encrypt or decrypt a file using crypt (not supported in all versions).[*]
[*] The crypt command's encryption is weak. Don't use it for serious secrets.
-y
Modeless vi; run vim in insert mode only, without a command mode. {vim}
-Z
Start vim in restricted mode. Do not allow shell commands or suspension of the editor. {vim}