On 7/26/06, Gary Johnson <[EMAIL PROTECTED]> wrote:
I tried using 'cdpath' on Windows and it seems to be broken, but I
don't know for sure since I've never used it before.  From the
Command Prompt I execute

    gvim -N -u NONE

Then within gvim,

    :set cdpath?
      cdpath=,,
    :pwd
    C:\Documents and Settings\garyjohn
    :cd Desktop
    C:\Documents and Settings\garyjohn\Desktop

So far, so good.  Now,

    :set cdpath+=C:\\Documents\ and\ Settings\\garyjohn
    :set cdpath?
      cdpath=,,,~/
    :cd /
    C:\
    :cd Desktop
    E344: Can't find directory "Desktop" in cdpath
    E472: Command failed
    Press ENTER or type command to continue

That looks like a bug to me, or am I missing something?  I'm using
Vim 7.0, no patches, obtained from sf.vim.net, and Windows XP.

In general, I find setting options involving file paths to be a pain
on windows machines, because it seems to require more backslash
escapes than is intuitive to me.  I was able to get a situation
similar to yours to work though:

For a directory named "C:\With Spaces\Target":

:set cdpath=c:\\With\\\ Spaces
:cd Target
:pwd
c:/With Spaces/Target

I find the 'let' command to be less cumbersome for path-type options on windows:

:let &cdpath='c:\With\ Spaces'
:set cdpath?
 cdpath=c:\With\ Spaces
:cd Target
:pwd
c:/With Spaces/Target

Hope this helps.

Reply via email to