首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Vim编辑器问题

Vim编辑器问题
EN

Stack Overflow用户
提问于 2012-02-26 02:38:09
回答 2查看 232关注 0票数 1

如果我通过opt/local中的Macports安装了Vim 7.3,那么我的vim/vimrc文件可以在我的主文件夹中工作吗?仅供参考我的操作系统是运行Mac osx 10.5的mac

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2012-02-26 02:51:53

您在Mac中的主文件夹是/Users/yourusername或常用的缩写~。因此,如果你把你的.vimrc文件放在~/.vimrc下,它会被vim拾取。

票数 1
EN

Stack Overflow用户

发布于 2012-02-26 02:46:42

键入:help vimrc检查部分c

代码语言:javascript
复制
 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
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/9446866

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档