main.c
defines main
. main
, VimMain
is defined (and called from wWinMain
, found in os_w32exe.c
): int # ifdef MSWIN VimMain # else main # endif
main()
calls include init_mappings()
init_highlight()
exe_pre_commands()
(which executes the commands that were given by the command line option --cmd
source_startup_scripts()
main()
calls is vim_main2()
. +eval
, reads all the plugin files. vim_main2
calls include set_init_3()
gui_start()
exe_commands()
(which executes +
, -c
and -S
command line options) main_loop()
(which does not return). --cmd
commands main_loop
executes normal mode commands until vim is terminated by calling normal_cmd()[normal_cmd()
. main_loop
is also used in the command-line window until that window is closed.