Search notes:

VIM: src/main.c

main / VimMain

main.c defines main.
In Windows environments, instead of main, VimMain is defined (and called from wWinMain, found in os_w32exe.c):
    int
# ifdef MSWIN
VimMain
# else
main
# endif
Some functions that main() calls include
The last function that main() calls is vim_main2().

vim_main2

If compiled with +eval, reads all the plugin files.
Some of the functions that vim_main2 calls include
At the function's end, it calls main_loop() (which does not return).

exe_pre_commands()

Execute --cmd commands

source_startup_scripts()

Sources startup files such as vimrc etc.

main_loop

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.

Index