Re: changing cwd (easy)
- jonah <jonahgoldstein@...> wrote:
> Hi,There is, but I'm not sure. Maybe ":cd %:p:h"? (or :lcd instead of :cd to
> How can you set the current working directory to the directory of the
> current file?
change dir only for the current window)
>see ":help :saveas"
> Also, is there a way to do a "Save as" and start working on the new
> file in one simple command?
> That is, say your working on test.txt. I want a shortcut for doing
> > w test2.txt
> > e test2.txt
> Thanks for any info,
>Hi,put this into your .vimrc
>How can you set the current working directory to the directory of the current
>Also, is there a way to do a "Save as" and start working on the new file in one
" Change to the directory the file in your current buffer is in
autocmd BufEnter * :cd %:p:h
I have copied it from somewhere quite a long time ago, and I can't
imagine living without it.