Warning message when sourcing .vimrc

前端 未结 2 1352
星月不相逢
星月不相逢 2020-12-14 08:59

I am trying to set up a .vimrc file in my home directory. The only thing it contains is the following.

\" Enable syntax highlighting
syntax on
<         


        
相关标签:
2条回答
  • 2020-12-14 09:14

    you can run . ~/.bashrc in console
    but you should run :source ~/.vimrc in vim
    vim will run ~/.vimrc automatically, you don't need run it manually.

    type :ver to check:

       system vimrc file: "$VIM\vimrc"
         user vimrc file: "$HOME\_vimrc"
     2nd user vimrc file: "$VIM\_vimrc"
          user exrc file: "$HOME\_exrc"
      2nd user exrc file: "$VIM\_exrc"
      system gvimrc file: "$VIM\gvimrc"
        user gvimrc file: "$HOME\_gvimrc"
    2nd user gvimrc file: "$VIM\_gvimrc"
        system menu file: "$VIMRUNTIME\menu.vim"
    
    0 讨论(0)
  • 2020-12-14 09:19

    Put following code on head in your ~/.vimrc.

    "return" 2>&- || "exit"
    
    0 讨论(0)
提交回复
热议问题