vim-ultisnips补全功能失效,无法识别解决办法

昨天又给vim配了一堆插件

发现了一个这个问题,vim的ultisnips插件不能用了!

首先,我先查看插件是否正常运行了

:script

从一堆正在运行插件里找到ultisnips的名字,说明插件正常运行

难道是因为键冲突,想想昨天装的插件,没有用到<tab>键的呀,我并没有使用supertab插件

于是在vimrc把ultisnips的触发键改了

let g:UltiSnipsExpandTrigger="<c-q>"

结果还是没反应。。。蛋疼了

会不会没开文件检测?

syntax on                    " 开启文件类型侦测
filetype indent on           " 针对不同的文件类型采用不同的缩进格式
filetype plugin on           " 针对不同的文件类型加载对应的插件
filetype plugin indent on    " 启用自动补全

去vimrc中检查,都开了呀。。。

然后,突然发现date、time等all.snipets里的内容可以补全,这个是通用补全文件,和文件类型是没有关系的,然而唯独这个正常。

于是乎,google到了以下网页

https://github.com/VundleVim/Vundle.vim/issues/16

其中,有这么一段是这么说的

As seen above, lots of UltiSnips users end up running into filetype-related issues if they configure this incorrectly (e.g. when using the UltiSnipsEdit command). For me, it was important to have the entire block of Vundle configuration in one piece, with the two filetype calls immediately above and below it (as shown by @gmarik above). Hopefully this helps someone who comes across this in the future.

意思大概是因为在vimrc中出现了两次filetype配置,故而引起冲突

果然,我的vimrc中

syntax on
filetype plugin on 

出现了两次!

在某个插件配置中,我又将这个配置写了一次

注释掉,问题解决~

转载于:https://www.cnblogs.com/acbingo/p/4757275.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值