2017年9月3日

vim | Error detected while processing function UltiSnips#TrackChange

更新 k-vim 后。终端打开 vim,插入模式,输入任意字符就会报错,出现一串的 “Error detected while processing function UltiSnips#TrackChange

症状类似这里:https://github.com/SirVer/ultisnips/issues/819

最终解决方案:使用 homebrew 版 vim

  1. (因为我之前安装过)先卸载:brew uninstall macvim
  2. 再重新安装:brew install macvim --override-system-vim

检验:在 /usr/local/bin 下执行 ls -lart,包含如下结果:

lrwxr-xr-x 1 plough wheel 34 9 3 15:41 vimex -> ../Cellar/macvim/8.0-136/bin/vimex
lrwxr-xr-x 1 plough wheel 36 9 3 15:41 vimdiff -> ../Cellar/macvim/8.0-136/bin/vimdiff
lrwxr-xr-x 1 plough wheel 32 9 3 15:41 vim -> ../Cellar/macvim/8.0-136/bin/vim
lrwxr-xr-x 1 plough wheel 33 9 3 15:41 view -> ../Cellar/macvim/8.0-136/bin/view
lrwxr-xr-x 1 plough wheel 31 9 3 15:41 vi -> ../Cellar/macvim/8.0-136/bin/vi
lrwxr-xr-x 1 plough wheel 35 9 3 15:41 mvimex -> ../Cellar/macvim/8.0-136/bin/mvimex
lrwxr-xr-x 1 plough wheel 37 9 3 15:41 mvimdiff -> ../Cellar/macvim/8.0-136/bin/mvimdiff
lrwxr-xr-x 1 plough wheel 33 9 3 15:41 mvim -> ../Cellar/macvim/8.0-136/bin/mvim
lrwxr-xr-x 1 plough wheel 34 9 3 15:41 mview -> ../Cellar/macvim/8.0-136/bin/mview
lrwxr-xr-x 1 plough wheel 35 9 3 15:41 gvimex -> ../Cellar/macvim/8.0-136/bin/gvimex
lrwxr-xr-x 1 plough wheel 37 9 3 15:41 gvimdiff -> ../Cellar/macvim/8.0-136/bin/gvimdiff
lrwxr-xr-x 1 plough wheel 33 9 3 15:41 gvim -> ../Cellar/macvim/8.0-136/bin/gvim
lrwxr-xr-x 1 plough wheel 34 9 3 15:41 gview -> ../Cellar/macvim/8.0-136/bin/gview

此时再执行 vim,会启动 homebrew 版的 vim,而不是系统自带的 vim。不会报错了。

You may also like...

发表评论

电子邮件地址不会被公开。 必填项已用*标注


*