error while running “source .vimrc”

前端 未结 2 427
鱼传尺愫
鱼传尺愫 2020-11-27 23:10

i am having a simple vimrc file when i run \"source .vimrc\" in ubuntu I am getting the following error.

$ source .vimrc 
bash: .vimrc: line 3: syntax error          


        
2条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-28 00:05

    You tried to source your Vim configuration file from bash. Do it from Vim:

    $ vim
    :source /path/to/.vimrc
    

    If it's located at ~/.vimrc, Vim will source that file automatically.

提交回复
热议问题