path is changing mysteriously...

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

path is changing mysteriously...

Lev Lvovsky-2
For some reason, with the many buffers that I have open, the path  
that a particular file takes, is instead of the initial directory  
where I started from (which is what I want), the directory that the  
file resides in.  Trying ":cd", or ":lcd" only temporarily changes  
it, and in a few seconds it changes back to the directory that the  
file actually resides in - what's going on?

thanks!
-lev
Reply | Threaded
Open this post in threaded view
|

Re: path is changing mysteriously...

iler.ml
On 10/19/06, Lev Lvovsky <[hidden email]> wrote:
> For some reason, with the many buffers that I have open, the path
> that a particular file takes, is instead of the initial directory
> where I started from (which is what I want), the directory that the
> file resides in.  Trying ":cd", or ":lcd" only temporarily changes
> it, and in a few seconds it changes back to the directory that the
> file actually resides in - what's going on?

'set acd' ('set autochdir') does it. Try :set noacd
If that doesn't help, this means you have autocmd that
does it.

Yakov
Reply | Threaded
Open this post in threaded view
|

Re: path is changing mysteriously...

Benji Fisher
On Thu, Oct 19, 2006 at 07:46:04PM +0200, Yakov Lerner wrote:

> On 10/19/06, Lev Lvovsky <[hidden email]> wrote:
> >For some reason, with the many buffers that I have open, the path
> >that a particular file takes, is instead of the initial directory
> >where I started from (which is what I want), the directory that the
> >file resides in.  Trying ":cd", or ":lcd" only temporarily changes
> >it, and in a few seconds it changes back to the directory that the
> >file actually resides in - what's going on?
>
> 'set acd' ('set autochdir') does it. Try :set noacd
> If that doesn't help, this means you have autocmd that
> does it.

     I suspect you are right, but then the question is where 'acd' was
set.  The way to find out is

:verbose set acd?

It is also possible that an autocommand (perhaps from a system vimrc
file) is causing the directory changes.

HTH --Benji Fisher