Re: :cd and :E
- On Sunday 03 September 2006 01:47, Max Dyckhoff wrote:
> I am so dense sometimes, I should have thought of that instantly :)Hehe, I never thought of using . either, it's just what I wanted:)
> > -----Original Message-----
> > From: A.J.Mechelynck [mailto:antoine.mechelynck@...]
> > Sent: Saturday, September 02, 2006 3:45 PM
> > To: Max Dyckhoff
> > Cc: Paul Irofti; vim@...
> > Subject: Re: :cd and :E
> > Max Dyckhoff wrote:
> > >>From :help :E, it looks like it is the correct behaviour.
> > >>
> > > :Explore[!] [dir]... Explore directory of current file
> > >
> > > If you want to explore an arbitrary directory, then just add the
> > > directory that you :cd into to the :E command. I don't know of a
> > > to browse the current working directory, sorry!
> > >
> > > Max
> > To browse the current directory (under Vim 7), use
> > :edit ./
> > I suppose
> > :Explore .
> > (with a dot at the end) would also work, including in earlier Vim
> > versions where Explorer was a different plugin than netrw. The
> > single dot means "the current directory".
> > Best regards,
> > Tony.
Thanks a lot guys!
- Quoting Paul Irofti <bulibuta@...>:
> If I :cd to another directory and then :E to browse through I get theYou might also want to consider setting g:netrw_keepdir=0 in your .vimrc.
> directory where the current buffer resides. Is this correct/wanted
> behavior? And if so why?
By default g:netrw_keepdir is 1, which means that the current directory
is not necessarily the same as the browsing directory. If you set it to
zero, then the current directory (that vim displays with :pwd) will be the
same as the browsing directory.