zoukankan      html  css  js  c++  java
  • 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 

    出现了两次!

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

    注释掉,问题解决~

  • 相关阅读:
    platform cannot apply stanford theme
    汉化、用户创建
    修改字段
    语言包格式错误引起组件崩溃
    配置LMS/Studio SMTP
    Javascript如何实现AOP
    【转】组件化的Web王国
    【转】前端组件化框架之路
    【转】ES6 手册
    【转】超实用的JavaScript技巧及最佳实践
  • 原文地址:https://www.cnblogs.com/acbingo/p/4757275.html
Copyright © 2011-2022 走看看