Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vimrc to be cross-platform and synced with Dropbox.

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.

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).

Any other pitfalls or recommendations when creating vimrc cross-plataform with Dropbox?

like image 906
Somebody still uses you MS-DOS Avatar asked Jul 20 '10 12:07

Somebody still uses you MS-DOS


1 Answers

I do a bunch of customization of my .vimrc, but it's all based on capabilities, rather than platform.

I check for the different has("gui_*") flags, and also check has("unix"). This way I avoid dealing with messy platform dependent path issues.

like image 74
rossipedia Avatar answered Sep 22 '22 13:09

rossipedia