在vim上安装typescript-vim后出现错误

时间:2019-04-27 16:39:10

标签: vim vim-plugin

我已按照以下说明在MacOsx上安装了typescript-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

(按ENTER命令后,我可以继续工作)

1 个答案:

答案 0 :(得分:0)

通过在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