加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

vim – 如何禁用YouCompleteMe并启用NeoComplete,仅针对一种文件

发布时间:2020-12-15 22:43:18 所属栏目:安全 来源:网络整理
导读:我在Vim中使用 YouCompleteMe进行自动完成.它与 VimShell不兼容,所以我想禁用它,只在VimShell缓冲区内. 如何禁用YouCompleteMe并从Vimscript启用NeoComplete? 解决方法 YouCompleteMe允许您配置文件类型白名单和黑名单,以启用或禁用给定文件类型的完成. htt
我在Vim中使用 YouCompleteMe进行自动完成.它与 VimShell不兼容,所以我想禁用它,只在VimShell缓冲区内.

如何禁用YouCompleteMe并从Vimscript启用NeoComplete?

解决方法

YouCompleteMe允许您配置文件类型白名单和黑名单,以启用或禁用给定文件类型的完成.

https://github.com/Valloric/YouCompleteMe#the-gycm_filetype_whitelist-option

Neocomplete具有与NeoCompleteUnlock / NeoCompleteLock类似的功能.

https://github.com/Shougo/neocomplete.vim/blob/290b9532ae3a04b53f0d0ecdee34e2b664229939/doc/neocomplete.txt#L204

例如,要禁用YouCompleteMe并为vimshell文件类型启用NeoComplete,您可以在.vimrc中使用类似的内容:

let g:ycm_filetype_blacklist = { 'vimshell': 1 }
autocmd FileType vimshell NeoCompleteUnlock

我无法测试这个,因为我不使用vimshell.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读