Error detected while processing function CheckFoam256 问题的解决

时间:2023-03-09 08:52:52
Error detected while processing function CheckFoam256 问题的解决

今天在打开OpenFOAM的constant文件的时候, vim-OpenFOAM-syntax插件遇到了如下问题:

Error detected while processing function CheckFoam256:
line 3:
E168: :finish used outside of a sourced file
Press ENTER or type command to continue

谷歌了一遍也没有找到是什么原因,估计可能是安装其他插件的时候有冲突,于是就自己尝试着修复.

修复方案如下,

首先确定了CheckFoam256这个函数的位置,

vim ~/.vim/ftdetect/scripts.vim

然后将错误提示位置的语句用"注释掉就可以了

Error detected while processing function CheckFoam256 问题的解决

测试之后发现问题解决了,而且不影响其他文件的语法高亮.

p.s. did_filetype()函数应该是filetype.vim里面的一个函数.具体的问题还没有深究.