Tuesday, April 5, 2011

vim unexpectedly changes current directory

hello group,

I use vim 7.3.35 from a debian package.

I use vim quite often. In the past few weeks, probably longer, I found
that vim sometimes behaves unexpectedly when using :e to edit a new
file. In the unexpected situation, the current directory appears to be
changed, although I didn't change it myself. I can see that by using
tab completion after :e. When I use :Ex instead, I see the context of
the directory where I expect to be.

Today I found out that it only occurs when I edit _certain files_.
Everything goes well until I edit such a 'certain file', after which I
end up in the wrong directory. After some more testing I found out
that in the corresponding view file of such a file (in ~/.vim/views),
a line appears on which is stated

lcd ~/the/unexpected/directory.

Bingo! I assume that deleting the view will normalize the situation
again.

does anybody know
* WHY this lcd line appears in the view file?
* what can be done to prevent this line from turning up in the view
file?

thanks in advance, Ruud

--
You received this message from the "vim_use" 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

No comments: