2012-02-25 83 views
1

如果我通过在opt/local中的Macports安装Vim 7.3,我的vim/vimrc文件是否可以在我的home文件夹中工作,该文件夹位于usr/local?仅供参考我的操作系统是Mac上运行的Mac OSX 10.5 ...Vim编辑问题

回答

1

在Mac OS X您的主文件夹/Users/yourusername或公共的较短形式~。所以如果你把你的.vimrc文件放在~/.vimrc下,它会被vim拾取。

+0

非常感谢。 – demet8 2012-02-25 19:53:01

0

类型​​检查部分c

c. Four places are searched for initializations. The first that exists 
is used, the others are ignored. The $MYVIMRC environment variable is 
set to the file that was first found, unless $MYVIMRC was already set 
and when using VIMINIT. 
- The environment variable VIMINIT (see also |compatible-default|) (*) 
    The value of $VIMINIT is used as an Ex command line. 
- The user vimrc file(s): 
     "$HOME/.vimrc" (for Unix and OS/2) (*) 
     "s:.vimrc"  (for Amiga) (*) 
     "home:.vimrc" (for Amiga) (*) 
     "$VIM/.vimrc" (for OS/2 and Amiga) (*) 
     "$HOME/_vimrc" (for MS-DOS and Win32) (*) 
     "$VIM/_vimrc" (for MS-DOS and Win32) (*) 
    Note: For Unix, OS/2 and Amiga, when ".vimrc" does not exist, 
    "_vimrc" is also tried, in case an MS-DOS compatible file 
    system is used. For MS-DOS and Win32 ".vimrc" is checked 
    after "_vimrc", in case long file names are used. 
    Note: For MS-DOS and Win32, "$HOME" is checked first. If no 
    "_vimrc" or ".vimrc" is found there, "$VIM" is tried. 
    See |$VIM| for when $VIM is not set. 
- The environment variable EXINIT. 
    The value of $EXINIT is used as an Ex command line. 
- The user exrc file(s). Same as for the user vimrc file, but with 
    "vimrc" replaced by "exrc". But only one of ".exrc" and "_exrc" is 
    used, depending on the system. And without the (*)! 
+0

这也有帮助。谢谢。 – demet8 2012-02-25 19:54:21