vim打开文件出现:Error detected while processing BufRead Auto commands for “*.py”(或者“*.c”、...”)

当使用vim打开.py或者.c文件时,出现例如如下错误日志时:

Error detected while processing BufRead Auto commands for "*.py":
E20: Mark not set

此问题出现在/etc/vim/vimrc 中的配置出错。出错语法为:

:au[tocmd] [group] {event} {pat} [nested] {cmd}

其中

{pat}  “不同模式之间不可以存在空格”

正确格式应为:

:au BufNewFile,BufRead *.py,*.c,*.php,*.rb,*.html,*.js,*.ts,*.md ...

将*.py、*.c等之间的空格去掉。

你可能感兴趣的:(vimrc,.c,Linux)