vimrc将跨平台并与Dropbox同步. [英] vimrc to be cross-platform and synced with Dropbox.
问题描述
到目前为止,我在Linux机器上一直使用vim/gVim,并且我也有Windows机器.在此Windows机器中,我主要是notepad ++.
I'v been using vim/gVim so far in my Linux Machine, and I have a Windows machine as well. In this windows machine I'm mainly notepad++.
我想存储所有我的
I would like to store all my .vimrc
settings and .vim
folder in Dropbox, and create symbolic links in Linux pointing to them, and them do the same in my Windows machine.
在我的配置中,我有很多家庭快捷方式表示法"(如果这不是正确的名称)~
,并且想知道是否记下了例如$ HOME而不是〜它将起作用:这样,我就可以在Windows中创建一些指向这些文件的符号链接(我使用的是Windows 7,所以我的家是c:\ Users \ username).
I have plenty of "home shortcut notation" (don't if this is the correct name) ~
in my configuration, and would like to know if writing down for example $HOME instead of ~ it's going to work: this way, I can create some symbolic links in Windows as well that points to these files (I'm using Windows 7, so my home is c:\Users\username).
使用Dropbox创建跨平台的vimrc时还有其他陷阱或建议吗?
Any other pitfalls or recommendations when creating vimrc cross-plataform with Dropbox?
推荐答案
这正是我所做的事情,它对我来说就像一种魅力.我使用$HOME
而不是~
的唯一位置是备份目录,但这很好.我遇到的主要问题是在Windows上编辑.vimrc
文件永远无法正常进行,因此我只是在OS X上进行编辑.
That's exactly what I do, and it works like a charm for me. The only place I use $HOME
instead of ~
is for the backup directories, but that works fine. The main problem I run into is that editing the .vimrc
file on Windows never works quite right, so I just edit it on OS X instead.
这篇关于vimrc将跨平台并与Dropbox同步.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!