如何在 vim 中启用 SuperTab 插件
你好,我安装了 neocomplcache 脚本,它很棒,但我想使用一个名为 SuperTab 的功能,并且网站上的文档我认为它是错误的,但我知道有 .vimrc 经验的人可以帮助我。 该站点是 this
在脚本的站点中有一堆行可以添加到您的 .vimrc 以获得功能,有一行我认为其格式错误,这就是为什么当我像这样添加时它不起作用,该行是这样的:
" SuperTab like snippets behavior.
"imap <expr><TAB> neocomplcache#sources#snippets_complete#expandable() ? "\<Plug>neocomplcache_snippets_expand)" : pumvisible() ? "\<C-n>" : "\<TAB>"
我将添加包含以下段落的行和在它上面用于上下文。
" 插件键映射。imap
(neocomplcache_snippets_expand) smap
(neocomplcache_snippets_expand) inoremap
neocomplcache#undo_completion() inoremap
neocomplcache#complete_common_string()“SuperTab 类似片段行为。”imap neocomplcache#sources#snippets_complete#expandable() ? “\(neocomplcache_snippets_expand)”:pumvisible() ? “\”: “\”
“推荐的键映射。”:关闭弹出窗口并保存缩进。 inoremap neocomplcache#smart_close_popup() 。 “\”“ : 完成。 inoremap pumvisible() ? “\”: "\" " , : 关闭弹出窗口并删除后台字符。inoremap neocomplcache#smart_close_popup()."\" inoremap neocomplcache#smart_close_popup()."\" inoremap neocomplcache#close_popup() inoremap neocomplcache#cancel_popup()
我应该如何添加它来启用该功能? 谢谢。
Hi i installed the neocomplcache script and its great but i want to use a feature its called SuperTab, and the documentation on the site i think its wrong but i know that somebody with .vimrc experience can help me.
The site is this
In the script's site there are a bunch of lines you can add to your .vimrc to get features, there is a line that i think its badly formated, and thats why it doesnt work when i add like it is, the line is this:
" SuperTab like snippets behavior.
"imap <expr><TAB> neocomplcache#sources#snippets_complete#expandable() ? "\<Plug>neocomplcache_snippets_expand)" : pumvisible() ? "\<C-n>" : "\<TAB>"
I'll add the line with the paragraphs below and above it for context.
" Plugin key-mappings. imap
(neocomplcache_snippets_expand) smap
(neocomplcache_snippets_expand) inoremap
neocomplcache#undo_completion() inoremap
neocomplcache#complete_common_string()" SuperTab like snippets behavior. "imap
neocomplcache#sources#snippets_complete#expandable() ?
"\(neocomplcache_snippets_expand)" : pumvisible() ? "\" :
"\"" Recommended key-mappings. " : close popup and save indent.
inoremap neocomplcache#smart_close_popup() . "\" "
: completion. inoremap pumvisible() ? "\" :
"\" " , : close popup and delete backword char. inoremap
neocomplcache#smart_close_popup()."\" inoremap
neocomplcache#smart_close_popup()."\" inoremap
neocomplcache#close_popup() inoremap
neocomplcache#cancel_popup()
How am i supposed to add it to enable that feature?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为我不明白这个问题,但我会这样做:
I don't think I understand the problem, but I'd do this: