我的.vimrc文件中写了以下内容
set number
set hlsearch
set mouse=a
map F2 :bprev CR
采购.vimrc文件时出现以下错误
-bash: .vimrc: line 4: syntax error near unexpected token `newline'
-bash: .vimrc: line 4: `map <F2> :bprev <CR>'
我的.vimrc文件中写了以下内容
set number
set hlsearch
set mouse=a
map F2 :bprev CR
采购.vimrc文件时出现以下错误
-bash: .vimrc: line 4: syntax error near unexpected token `newline'
-bash: .vimrc: line 4: `map <F2> :bprev <CR>'
.vimrc
isn't a shell script; it's avim
script. Both programs have aset
command (though each does something very different than the other), which is how you get to line 4 at all. The problem here is that the shell sees the<
and>
as redirection operators, and the final>
is followed by a newline, not a file name; hence, the syntax error.