*starting.txt* For Vim version 7.4. Last change: 2016 Apr 05
VIM REFERENCE MANUAL by Bram Moolenaar
Starting Vim *starting*
1. Vim arguments |vim-arguments|
2. Vim on the Amiga |starting-amiga|
3. Running eVim |evim-keys|
4. Initialization |initialization|
5. $VIM and $VIMRUNTIME |$VIM|
6. Suspending |suspend|
7. Exiting |exiting|
8. Saving settings |save-settings|
9. Views and Sessions |views-sessions|
10. The viminfo file |viminfo-file|
==============================================================================
1. Vim arguments *vim-arguments*
Most often, Vim is started to edit a single file with the command
vim filename *-vim*
More generally, Vim is started with:
vim [option | filename] ..
Option arguments and file name arguments can be mixed, and any number of them
can be given. However, watch out for options that take an argument.
For compatibility with various Vi versions, see |cmdline-arguments|.
Exactly one out of the following five items may be used to choose how to
start editing:
*-file* *---*
filename One or more file names. The first one will be the current
file and read into the buffer. The cursor will be positioned
on the first line of the buffer.
To avoid a file name starting with a '-' being interpreted as
an option, precede the arglist with "--", e.g.: >
vim -- -filename
< All arguments after the "--" will be interpreted as file names,
no other options or "+command" argument can follow.
For behavior of quotes on MS-Windows, see |win32-quotes|.
*--*
- This argument can mean two things, depending on whether Ex
mode is to be used.
Starting in Normal mode: >
vim -
ex -v -
< Start editing a new buffer, which is filled with text
that is read from stdin. The commands that would normally be
read from stdin will now be read from stderr. Example: >
find . -name "*.c" -print | vim -
< The buffer will be marked modified, because it contains text
that needs to be saved. Except when in readonly mode, then
the buffer is not marked modified. E