Jean-Rene David wrote:
I've been using the Project plugin for many years
now and I like it a lot. However one problem keeps
bugging me.
I would like to share my ~/.vimprojects file
between my cygwin and windows version of vim.
The problem is the paths for the project. When I
enter a posix path, the windows version doesn't
recognize it and vice-versa. I could run the file
through a small script which converts the paths
with cygpath but keeping them synchronized would
be cumbersome.
Any ideas?
If there are paths in the source of your scripts, you can disambiguate
between Cygwin and Windows (and, possibly, Linux if you have dual-boot):
Windows "native"
has("win32unix") == 0
has("unix") == 0
Cygwin
has("win32unix") == 1
has("unix") == 1
Linux
has("win32unix") == 0
has("unix") == 1
So, for instance,
if has("unix")
" code specific to Linux or Cygwin
else
" code specific to "native" Windows
endif
or
if has ("win32unix")
" Cygwin-only code
elseif has("unix")
" code for "true" unix
else
" code for "native" Windows
endif
seε
:help has()
:help feature-list
HTH,
Tony.