Search notes:

Vim command line options

--cmd
--server
--socketid
--windowid
-i viminfo.file (if viminfo.file = NONE, no viminfo file is used)
-n don't use swap file
See also option swapfile
-T terminal set terminal type to terminal
-Vn sets verbose option to n (default = 10).

-c / --cmd command

--cmd command executes command before any startup files are processed.
Commands that are specified with the -c option are executed after
For example, to prevent the sourcing of runtime/menu.vim, the M flag might be included into guioptions:
C:\> gvim -u NONE -U NONE --cmd "set guioptions+=M"
These commands are processed by the function exe_pre_commands() (src/main) which is called before source_startup_scripts().
See also the members pre_commands and commands in the mparm_T struct.

-g

vim -g starts vim as GUI.

-S

-S file.vim sources file.vim.
-S as last argument or directly followed by another option sources a session file

--startuptime

Find out why vim is startup up slowly:
vim --startuptime [file]

-u / -U

-u specifies the the vimrc file.
-U specifies the gvimrc file.
The value of -u is assigned to use_vimrc in the mparm_T struct.
If gvimrc is NONE, no gvimrc file is read at all.
The option can be set to the special values NONE and DEFAULTS.
These values are handled in source_startup_scripts() (main.c).

Read from STDIN

1 .. 10 | foreach-object { "line $_"} | gvim -

See also

:help startup-options, :help vim-arguments

Index