Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1270481
  • 博文数量: 482
  • 博客积分: 13297
  • 博客等级: 上将
  • 技术积分: 2890
  • 用 户 组: 普通用户
  • 注册时间: 2009-10-12 16:25
文章分类

全部博文(482)

文章存档

2012年(9)

2011年(407)

2010年(66)

分类: LINUX

2011-09-23 13:52:59

http://blog.chinaunix.net/cp.php?ac=blog&blogid=2894095&op=edit
    
      最近用到vim的插件时出现了很多问题,发现很多问题都跟插件的加载顺序有关。
那么vim插件的加载顺序怎么呢?
      google一下没搜到答案,用英文搜了一下找到了些线索。
 =============================================================================================
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.

-------------------------------------



==============================================================================================
       scriptnames命令会列出你加载的插件列表,按加载顺序排列。不用总结哪个目录的插件先加载了,直接运行这条命令就好,一目了然。

阅读(2013) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~