Hi Björn > This behavior of changing the pwd is a feature and not a bug. If you > open a new file (via open panel, by dropping, ...) the pwd is changed > if the window is "unused".
I can see the rationale for that. Personally I often find myself working on a group of files, then closing every buffer to have a "clean slate" before starting work on the next bug/feature in the current project. So, for me, this behaviour is unfortunate because it means I really need to always keep at least one file open, so that the working directory is not changed by the next file I open. That's not a serious problem, of course, and I don't know if other people work in the same way as I do, and find the behaviour unwelcome. Maybe it's just me! > In most cases I think this is what you'd expect, but I can see that it > is confusing if you use "mvim" specifically to open a new window in a > certain directory. Not sure what to do about this? (I'm open to > suggestions.) How about testing for "noautochdir" at the point where the code decides the window is unused? If noautochdir is set, then don't mess with pwd. That way, users could have a way of disabling this behaviour if they don't want it, and noautochdir is a fairly intuitive way to think about turning it off. Another possibility that I might look at for my own purposes is to use a shell script to launch mvim, which first sets an environment variable to `pwd`, and an autocmd in my .vimrc that chdirs to that directory whenever a file is opened. That should force the working directory to stay the same. David -- You received this message from the "vim_mac" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
