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

pwd seems to depend on the window

Expand Messages
  • Paul
    The newest version of gvim for Windows seems to have different present- working-directories for each window. Is there anyway to have the old behaviour, where
    Message 1 of 5 , May 11 5:08 PM
    • 0 Attachment
      The newest version of gvim for Windows seems to have different present-
      working-directories for each window. Is there anyway to have the old
      behaviour, where if I do ":cd %:p:h" on one window to get to the
      containing folder, the pwd will stay in that folder when I switch to
      another window/buffer?

      --
      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
    • John Beckett
      ... The first sets Vim s current directory for all windows. The second sets it only for the current window. ... If there is a problem, start with gvim -N -u
      Message 2 of 5 , May 11 5:28 PM
      • 0 Attachment
        Paul wrote:
        > The newest version of gvim for Windows seems to have
        > different present- working-directories for each window. Is
        > there anyway to have the old behaviour, where if I do ":cd
        > %:p:h" on one window to get to the containing folder, the pwd
        > will stay in that folder when I switch to another window/buffer?

        I don't see a problem. These commands can be used:
        :cd %:p:h
        :lcd %:p:h

        The first sets Vim's current directory for all windows.
        The second sets it only for the current window.

        Check autochdir value:
        :verbose set autochdir?

        If there is a problem, start with
        gvim -N -u NONE

        then work out some simple commands that illustrate a problem,
        and post them and the result.

        John

        --
        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
      • Paul
        Will do...as soon as I find the circumstances that gave rise to the problem. It doesn t always seem to exhibit itself. ... -- You received this message from
        Message 3 of 5 , May 11 6:41 PM
        • 0 Attachment
          Will do...as soon as I find the circumstances that gave rise to the
          problem. It doesn't always seem to exhibit itself.

          On May 11, 8:28 pm, "John Beckett" <johnb.beck...@...> wrote:
          > Paul wrote:
          > > The newest version of gvim for Windows seems to have
          > > different present- working-directories for each window.  Is
          > > there anyway to have the old behaviour, where if I do ":cd
          > > %:p:h" on one window to get to the containing folder, the pwd
          > > will stay in that folder when I switch to another window/buffer?
          >
          > I don't see a problem. These commands can be used:
          >     :cd %:p:h
          >     :lcd %:p:h
          >
          > The first sets Vim's current directory for all windows.
          > The second sets it only for the current window.
          >
          > Check autochdir value:
          >     :verbose set autochdir?
          >
          > If there is a problem, start with
          >     gvim -N -u NONE
          >
          > then work out some simple commands that illustrate a problem,
          > and post them and the result.
          >
          > John

          --
          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
        • Ben Fritz
          ... I know on Windows, Vim sometimes changes directories to the file s path when passed an absolute path to the file. I don t remember the circumstances in
          Message 4 of 5 , May 14 9:26 AM
          • 0 Attachment
            On Friday, May 11, 2012 8:41:20 PM UTC-5, Paul wrote:
            > Will do...as soon as I find the circumstances that gave rise to the
            > problem. It doesn't always seem to exhibit itself.
            >

            I know on Windows, Vim sometimes changes directories to the file's path when passed an absolute path to the file. I don't remember the circumstances in which this happens, or whether the directory change is local or global, and I can't find the help reference at the moment. I think it's designed for drag-n-drop, which is also invoked by the --remote series of commands, if that helps you reproduce. You can scour the help if you need the exact circumstances.

            --
            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
          • Paul
            ... John Beckett, Ben Fritz, Thanks for your replies. As it turns out, setting noautochdir seems to have solved the problem. -- -- You received this message
            Message 5 of 5 , Mar 20, 2013
            • 0 Attachment
              On May 14 2012, 12:26 pm, Ben Fritz wrote:
              >On Friday, May 11, 2012 8:41:20 PM UTC-5, Paul wrote:
              >> Will do...as soon as I find the circumstances that gave rise to the
              >> problem. It doesn't always seem to exhibit itself.
              >
              > I know on Windows, Vim sometimes changes directories to the file's
              > path when passed an absolute path to the file. I don't remember the
              > circumstances in which this happens, or whether the directory change
              > is local or global, and I can't find the help reference at the
              > moment. I think it's designed for drag-n-drop, which is also invoked
              > by the --remote series of commands, if that helps you reproduce. You
              > can scour the help if you need the exact circumstances.

              John Beckett, Ben Fritz,

              Thanks for your replies. As it turns out, setting noautochdir seems
              to have solved the problem.

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

              ---
              You received this message because you are subscribed to the Google Groups "vim_use" group.
              To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
              For more options, visit https://groups.google.com/groups/opt_out.
            Your message has been successfully submitted and would be delivered to recipients shortly.