93827Re: Auto-cd to remote dir
- Aug 1, 2008
> But, I digress. The OS keeps a "working directory", sure - butAnd without passing any comment on whether it would be a good idea to
> there's no reason why vim can't have a "current directory" abstraction
> of its own, independent of the OS.
move netrw into Vim core, couldn't this 'current directory' abstraction
be kept in netrw simply by supporting relative URLs? E.g. if I do
then myfile.txt should be written in the current remote directory.
Likewise, files can be looked for in the current remote directory for :e
etc. An error could be given if the current directory is a different
protocol to what you specify. This shouldn't be very hard to implement,
Over time, if desired, netrw's notion of 'current directory' could be
kept as a window-local variable rather than a global variable, solving
the problem of editing multiple files in different directories/on
different servers (just as :lcd solves that problem locally). Commands
could be provided to change that directory (:Remotecd or whatever). It
would also mean that navigating with netrw's explorer in another window
wouldn't affect the current directory of other windows. :Explore could
by default explore the current remote directory, or if there is none,
the current local directory, rather than the directory of the current
file, which I think would make more sense.
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
- << Previous post in topic Next post in topic >>