如何检查SuperTab和jedi-vim是否已激活? [英] How to check if SuperTab and jedi-vim is activated?

查看:110
本文介绍了如何检查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').

这篇关于如何检查SuperTab和jedi-vim是否已激活?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆