The vim
binary is able to answer by many names and it will tweak its behavior based on which name it is called.
This is a somewhat common practice in Unix, where a program will support checking the name by which it's invoked and will behave differently depending on that name.
At installation time, a single binary will be copied, but symbolic links or hardlinks will be created to make it available under all possible names.
In case of vim
, it actually supports being called under quite a variety of names. You can see a comprehensive list under :help vim-arguments
:
The startup mode can be changed by using another name instead of vim
, which is equal to giving options:
ex
(vim -e
): Start in Ex mode.
exim
(vim -E
): Start in improved Ex mode.
view
(vim -R
): Start in read-only mode.
gvim
(vim -g
): Start the GUI.
gex
(vim -eg
): Start the GUI in Ex mode.
gview
(vim -Rg
): Start the GUI in read-only mode.
rvim
(vim -Z
): Like vim
, but in restricted mode.
rview
(vim -RZ
): Like view
, but in restricted mode.
rgvim
(vim -gZ
): Like gvim
, but in restricted mode.
rgview
(vim -RgZ
): Like gview
, but in restricted mode.
evim
(vim -y
): Easy Vim: set 'insertmode'
.
eview
(vim -yR
): Like evim
in read-only mode.
vimdiff
(vim -d
): Start in diff mode.
gvimdiff
(vim -gd
): Start in diff mode.