gVim安装vim-template插件后提示Undefined variable vim_template_subtype/Press ENTER or type command to continue

Win7 64位

gVim:version 8.1.1234

vim-template:github链接

安装方式:

直接下载master的zip压缩包,解压后放入本地gVim安装目录的plugin,如:

C:\Program Files\Vim\vim81\plugin

此时我遇到两个问题:

一个是直接双击桌面的gVim图标打开,提示Undefined variable vim_template_subtype

其次,dos下使用vim命令,提示Press ENTER or type command to continue

记录下解决办法:

找到C:\Program Files\Vim\vim81\plugin\vim-template\syntax\vim-template.vim

修改

if b:vim_template_subtype != ""

为:

if exists("b:vim_template_subtype") && b:vim_template_subtype != ""

两个问题都解决了。爽。

猜你喜欢

转载自www.cnblogs.com/icoding-t/p/10795973.html