UltiSnips 和 YouCompleteMe [英] UltiSnips and YouCompleteMe

查看:17
本文介绍了UltiSnips 和 YouCompleteMe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的 macvim 上安装了 ultisnips 和 youcompleteme 包.问题是 ultisnips 不起作用,因为选项卡受 ycm 约束.我尝试放置 let g:UltiSnipsExpandTrigger = "<s-tab>" 以便我可以使用 shift-tab 触发代码段完成,但由于某些未知原因它不起作用.我可以使用大写作为触发器,但到目前为止我还没有找到这样做的方法.

I have bundles ultisnips and youcompleteme installed on my macvim. The problem is that ultisnips doesn't work because tab is bound by ycm. I tried putting let g:UltiSnipsExpandTrigger = "<s-tab>" so that I can trigger the snippet completion with shift-tab, but it doesn't work for some unknown reason. I could use caps as the trigger, but so far I've found no way to do that.

你们中有人一起使用这两个附加组件吗?我该怎么做才能使 shift-tab 工作?你能推荐另一个触发片段的键吗?

Do any of you use those two add-ons together? What can I do to make shift-tab work? Can you recommend another key to trigger snippets?

推荐答案

我的 vimrc 中有这个

i have this in my vimrc

"" YouCompleteMe
let g:ycm_key_list_previous_completion=['<Up>']

"" Ultisnips
let g:UltiSnipsExpandTrigger="<c-tab>"
let g:UltiSnipsListSnippets="<c-s-tab>"

这就是我第一次尝试时所做的,但我把 UltiSnips 和 Ultisnips 拼错了.. 哦,好吧,最后成功了!

thats what i did on my first try, but i misspelled UltiSnips with Ultisnips.. oh well, worked out in the end!

这篇关于UltiSnips 和 YouCompleteMe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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