在 vim 上安装打字稿 vim 后出错



我已经在我的MacOsx上安装了打字稿-vim,就像下面的说明一样:

git clone https://github.com/leafgarland/typescript-vim.git ~/.vim/plugged/typescript-vim

我已将此代码放在.vimrc文件中:

Plug 'leafgarland/typescript-vim'

然后:

:PlugInstall

所以插件已经安装了蜜蜂,但是当我在 vim 中打开任何文件时,我会收到错误:

Error detected while processing FileType Autocommands for "typescript":
E492: Not an editor command: JsPreTmpl html

(按回车命令后,我可以继续工作(

我能够通过在 Vim 缓冲区中从 vim-js-pretty-template 调用 :JsPreTmpl html 命令来产生这样的错误,而无需在我的 Vim 捆绑包中安装该插件。

查看.vimrc.vimrc.local - 我猜你会看到autocmd FileType javascript JsPreTmpl html行。如果这是真的,您有两种选择可以使此错误消失:删除自动命令或安装插件。

https://github.com/vim-scripts/vim-js-pretty-template

最新更新