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

137473Re: Still having different pwd for different windows

Expand Messages
  • Christian Brabandt
    May 2, 2013
    • 0 Attachment
      Hi AndyHancock!

      On Mi, 01 Mai 2013, AndyHancock wrote:

      > On Apr 29, 5:09 am, Marcin Szamotulski wrote:
      > > If the above will not solve your problem you can record your local
      > > directory in vimrc:
      > >
      > > let g:pwd = getcwd()
      > >
      > > and in a '.vim/after/plugin/myscript.vim' use:
      > >
      > > set noautochdir
      > > exe 'cd '.fnameescape(g:pwd)
      > >
      > > If this was due to lcd used somewhere it should solve it. I assume
      > > that it only happens on startup, if not you might need to use
      > > autocommands. Maybe it only happens with some file type?
      > Unfortunately, it doesn't just happen at startup. I haven't been able
      > to determine the triggering event.

      2 suggestions to help finding out why/when your working directory

      1) :set verbose=5
      When the verbose setting is set to at least 5, Vim will always
      print whenever it changes directories. This might however be
      accompanied with a lot of other verbose messages in which you are
      not interested.

      2) Try if :set cpo+=. helps. This prevents changing directories, if
      your buffer is modified. So this doesn't work in all cases, but
      should at least prevent changing directories, when you are editing
      a file.

      Kabarett ist ein Breitband-Antiidiotikum.
      -- Volker Pispers

      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.
    • Show all 11 messages in this topic