On Sat, 17 Jun 2006, K.S.Sreeram wrote:

[EMAIL PROTECTED] wrote:
:he netrw-problems

In particular, look at P6.

Thanks for the pointer, but unfortunately doing
let g:netrw_keepdir = 0
in _vimrc file does not seem to have any effect at all!

Here's what happens:

1) run gvim.exe
2) :pwd (output: c:\Vim\vim70)
3) :e c:\Projects\Test\ (shows directory listing)
4) :pwd (output: c:\Vim\vim70)

If I have 'set autochdir', then :

3) :e c:\Projects\Test (shows directory listing)
4) :pwd (output: c:\Projects) (I'd like this to be c:\Projects\Test!)

So in either case, g:netrw_keepdir=0 doesn't have any effect at all, I
even tried with a fresh install of vim7 without any extra plugins and
the result was the same!
How do I solve this?

Sreeram,

For Netrw v98, this hack seems to make it work as requested:

  (1) Do NOT set g:netrw_keepdir at all in vimrc.
  (2) Edit $VIMRUNTIME/autoload/netrw.vim
      Change line 2887 from

        if !g:netrw_keepdir

      to

        if g:netrw_keepdir

Chip,

Something in the other

  if !g:netrw_keepdir
    ..
  endif

blocks is causing the trouble for the if block at line 2887.

HTH.
--
Gerald

Reply via email to