简体   繁体   English

软链接的.vimrc和.vim小牛不起作用

[英]Soft linked .vimrc and .vim Mavericks not working

I'm trying to share my vim plugins, in my .vim file, and my .vimrc across multiple machines. 我正在尝试在多台计算机上共享.vim文件中的vim插件和.vimrc。 To do this, I moved my .vim and .vimrc to a folder in my user directory and use git to push and pull updates. 为此,我将.vim和.vimrc移到了用户目录中的文件夹中,并使用git推送和提取更新。

In my home directory I use soft links to point to these files. 在主目录中,我使用软链接指向这些文件。

ln -sf ~/scripts/vimrc ~/.vimrc

I can see these hidden files in my user directory and all seems well. 我可以在用户目录中看到这些隐藏文件,而且看起来一切正常。 The problem is, this works well on my one machine, the machine who these files originally belonged to. 问题是,这在我的一台计算机(这些文件最初所属的计算机)上运行良好。 But, does not work at all on the other. 但是,另一方面根本不起作用。 I am running Mavericks on both machines. 我在两台计算机上都运行Mavericks。

I don't see any of the following files: ~/.gvimrc, ~/_vimrc 我看不到以下任何文件:〜/ .gvimrc,〜/ _vimrc

Removing these files seem to be the solution to other people's issues with the vimrc but it doesn't appear to be the problem I'm having. 删除这些文件似乎是解决vimrc的其他人问题的解决方案,但这似乎不是我遇到的问题。

Does anyone have any ideas how to get this working? 有谁知道如何使它正常工作吗?

I discovered by running :scriptnames that the vimrc that it was loading was not from my root directory but was /usr/share/vim/vimrc . 我通过运行:scriptnames发现它正在加载的vimrc不是来自我的根目录,而是/usr/share/vim/vimrc And the vim folder was also not in my root directory but was /usr/share/vim/vim73 而且vim文件夹也不在我的根目录中,而是/usr/share/vim/vim73

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM