Loading ...
Sorry, an error occurred while loading the content.

93816Re: Auto-cd to remote dir

Expand Messages
  • Tony Mechelynck
    Aug 1, 2008
      On 01/08/08 22:49, dae3 wrote:
      > On Wed, 30 Jul 2008 20:15:43 -0400,
      > Charles E. Campbell, Jr.<drchip@...> wrote:
      >
      >> g:netrw_keepdir _does_ work: netrw has its own notion of the current
      >> directory (b:netrw_curdir), and g:netrw_keepdir means that vim's current
      >> directory (:pwd) will track b:netrw_keepdir if its 0 (and b:netrw_curdir
      >> is a local directory).
      >
      >
      > Thanks, but I what I needed was to set Vim's pwd to a remote directory.
      >
      > I really don't understand the reason for this limitation, I just wanted
      > to do a simple thing like edit a remote file and :sav it with a new name
      > in the same remote directory without re-typing the whole path.
      >
      > Maybe netrw's functionality should be moved inside Vim's core, because
      > as it is now it really feels tacked-on and not really integrated. Just
      > my opinion.
      >
      > Regards,
      > dae3

      The reason is, plain and simple, that on most operating systems the
      current working directory must be local (or made to look to the OS as if
      it were local). Period. Netrw, which allows reading and writing files
      and directories over a number of network protocols, is a set of scripts
      written in the same programming language as your vimrc, and indeed it is
      "tacked on top" of the Vim C core. The advantage is that, if a bug is
      found in netrw, you can cure it by upgrading the scripts, without the
      need to recompile Vim.


      Best regards,
      Tony.
      --
      Some people are born mediocre, some people achieve mediocrity, and some
      people have mediocrity thrust upon them.
      -- Joseph Heller, "Catch-22"

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Show all 8 messages in this topic