如何检查SuperTab和jedi-vim是否已激活?
如标题所述,如何检查插件是否已加载?
As the title states, how do I check if a plugin is loaded?
当我点击 tab (对于SuperTab)时,我得到的只是插入文件中的普通字符"tab",而当我点击 ctrl-space 时,我只会被抛出退出插入模式(与按 ESC 相同的行为)
When I hit tab (for SuperTab) all I get is the ordinary character "tab" inserted in my file and when I hit ctrl-space I just get thrown out of insert-mode (same behavior as hitting ESC)
:scriptnames
命令列出了所有已来源的脚本.检查其输出中的插件名称.如果丢失,则可能是由于安装错误或'runtimepath'
不正确.
The :scriptnames
command lists all scripts that have been sourced; check for the plugin name in its output. If it's missing, it is either due to a wrong installation or because 'runtimepath'
is incorrect.
或者,如果您知道插件应定义的映射
Alternatively, if you know the mapping a plugin should define
:verbose imap <Tab>
将显示映射以及设置脚本的位置.
will show the mapping and from which script is was set.
以编程方式,最好检查规范的包含保护if exists('g:loaded_pluginname')
或通过if exists(':PluginCommand')
检查已定义的命令.
Programmatically, it is best to check for the canonical include guard if exists('g:loaded_pluginname')
or for a defined command via if exists(':PluginCommand')
.