Vim settings.
Questioner:
Shuige pavilion | views: 58
I am a newbie to vim. I just want to enable vim settings. Run bash-3.2 # source./vimrc_example.vi and the result fails. Bash-3.2 # cd/usr/share/vim/vim71/bash-3.2 # source. /vimrc_example.vim bash: An example for a vimrc file.: command not foundbash: Maintainer: Bram Moolenaar <Bram@vim.org>: command not foundbash: for Unix and OS/2 :~ /. Vimrc: No such file or directorybash: for MS-DOS and Win32: \ _ vimrc: command not foundbash :. /vimrc_example.vim: line 17: syntax error near unexpected token '('bash :. /vimrc_example.vim: line 17: '"Use Vim settings, rather then Vi settings (much better !). '
Let me help.
Report |
Satisfactory answer
Of course it is wrong. The vimrc file is executed by vim. You can execute the source command in bash, and shell runs vimrc as a shell script. Vim/usr/share/vim/vim71/vimrc_example.vim and enter so % in vim.
Question
Thank you for your help. I also want to ask, how can I make vimrc effective for every time vim is opened? I found that after setting it like that, it only works for the current vim window? Sorry, it is inevitable that new users will be naive.
Answer
Vim is loaded every time it starts ~ /. Vimrc file, as long as the initial settings are written in this file, it will be automatically loaded. Run the following command cat/usr/share/vim/vim71/vimrc_example.vim> ~ /. Vimrc.