Thanks for all replies.  The solution I've settled on is to create a
custom
command with %:p:h and map it to a function key so I don't
accidentally type
:sav instead of :Sav.

"SaveasSamePath saves with new name to same path (all one line)
command! -nargs=1 SaveasSamePath exe "saveas " . expand("%:p:h") .
expand("<args>")

"F7 calls SaveasSamePath.  Note space at end of line
map <F7> :SaveasSamePath

I've seen other threads reporting obscure problems with autochdir and
the help
implies (to me) relying on it now or in future is not a good idea
unless you
really need to be compatible with "Sun ONE Studio 4 Enterprise
Edition".
Probably being over-cautious but I just don't like it.

By the way the I found the same problem with BufFilePre and
BufFilePost
using redhat VIM - Vi IMproved 7.0.

regards,
Geoff

-- 
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

Reply via email to