编辑完vimrc之后用
source /etc/vimrc报错
-bash: /etc/vimrc: line 15: syntax error near unexpected token `"autocmd"'
-bash: /etc/vimrc: line 15: `if has("autocmd")'
以为是语法问题
实际原因:vimrc是vim起动时解释的,而不是由shell来解释。用shell来source它肯定不行。
编辑完vimrc之后用
source /etc/vimrc报错
-bash: /etc/vimrc: line 15: syntax error near unexpected token `"autocmd"'
-bash: /etc/vimrc: line 15: `if has("autocmd")'
以为是语法问题
实际原因:vimrc是vim起动时解释的,而不是由shell来解释。用shell来source它肯定不行。