【问题标题】:Snippet plugin for MacVim does not workingMacVim 的片段插件不起作用
【发布时间】:2020-09-17 06:54:51
【问题描述】:

我使用 vundle 在 MacVim 上安装了 UltiSnips 插件。下面是.vimrc

call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')

" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'

" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.

"Plugin 'sirver/ultisnips'

" Snippets are separated from the engine. Add this if you want them:
"Plugin 'honza/vim-snippets'

" Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe.
"let g:UltiSnipsExpandTrigger="<tab>"
"let g:UltiSnipsJumpForwardTrigger="<c-b>"
"let g:UltiSnipsJumpBackwardTrigger="<c-z>"

" If you want :UltiSnipsEdit to split your window.
"let g:UltiSnipsEditSplit="vertical"
"
" All of your Plugins must be added before the following line
call vundle#end()            " required

安装看起来不错,但是当我尝试运行命令 :UltiSnipsEdit 时,它返回错误“E492:不是编辑器命令:UltiSnipsEdit”。

编辑: 我错误地注释了安装 UltiSnips 的行。我再次安装了 UltiSnips 并再次尝试 :UltiSnipsEdit 命令。相反,我收到了以下错误消息:

Error detected while processing /Users/arya/.vim/bundle/ultisnips/autoload/UltiSnips.vim:
line    7:
E319: Sorry, the command is not available in this version: py3 import vim
line    8:
E319: Sorry, the command is not available in this version: py3 from UltiSnips import UltiSnips_Manager
Error detected while processing function UltiSnips#Edit:
line    6:
E319: Sorry, the command is not available in this version:     py3 vim.command("let file = '%s'" % UltiSnips_Manager._file_to_edit(vim.eval("type"), vim.eval('a:bang')))

这可能是什么问题,我该如何解决?

【问题讨论】:

    标签: macos vim vim-plugin macvim


    【解决方案1】:

    您的插件未安装,因为此行已被注释:

    "Plugin 'sirver/ultisnips'
    

    【讨论】:

    • 你是对的,我取消了它的注释并再次运行 :PluginInstall。运行时出现另一个错误:UltiSnipsEdit。我将在我的问题中添加错误消息。
    • 您最初的问题已解决,因此您应该将问题标记为已回答。现在你有另一个问题,因此应该问一个单独的问题。
    • 很抱歉,我会为此创建新问题。
    猜你喜欢
    • 2021-01-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-02-06
    • 2015-06-25
    • 1970-01-01
    • 2016-12-20
    • 1970-01-01
    相关资源
    最近更新 更多