what is the load order of scripts when you start up vim?

If you start up vim with something like this:

vim -S myscript.vim file.txt

What is the load order of scripts? Does myscript.vim get loaded after or before ~/.vimrc.

If you pass in vimscript commands to vim directly on the command line, when do they get executed relative to sourced and default vimscripts?


The help entry is way too long to post here, but it lists the order of everything that vim does at initialization. See :help initialization .


I believe vimrc is always first. You can run :scriptnames to get a list of sourced scripts in order in which they were first sourced in your Vim instance.

链接地址: http://www.djcxy.com/p/8702.html

上一篇: Vim用户,你在哪里休息你的右手?

下一篇: 启动vim时脚本的加载顺序是什么?