采购.vimrc时出现警告消息 [英] Warning message when sourcing .vimrc
本文介绍了采购.vimrc时出现警告消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在我的主目录中设置一个 .vimrc
文件。它只包含以下内容。
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
每当我想要运行。〜/ .vimrc
/Users/username/.vimrc:3: unmatched "
我的工作环境如下。
- MacOS Lion 10.7.2
- zsh 4.3.12(i386-apple-darwin11.2.0 )
- oh_my_zsh
- Terminal 2.2.1
- VIM 7.3
- MacOS Lion 10.7.2
- zsh 4.3.12 (i386-apple-darwin11.2.0)
- oh_my_zsh
- Terminal 2.2.1
- VIM 7.3
摆脱此警告/错误消息。是什么意思?
How can I get rid of this warning/error message. What does it mean?!
EDIT
bash
也不起作用。
bash-3.2$ . ~/.vimrc
bash: /Users/username/.vimrc: line 1: unexpected EOF while looking for matching `"'
bash: /Users/username/.vimrc: line 3: syntax error: unexpected end of file
bash-3.2$
推荐答案
你可以在控制台中运行。〜/ .bashrc
但是你应该运行:source〜/ .vimrc
在vim中
vim将自动运行〜/ .vimrc
,您不需要手动运行它。
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.
键入:ver
以检查:
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"
这篇关于采购.vimrc时出现警告消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文