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

9933Re: mvim on file with path

Expand Messages
  • Nico Weber
    Feb 9, 2009
    • 0 Attachment
      > > The best fix I can think of is to store the original directory during
      > > vim startup chdir() back to that in the child process before calling
      > > exec(). Any better suggestions?
      > This sounds a bit too hacked together, but the only other solution I
      > can think of is to fork earlier.
      > At the moment (as far as I can understand) we only fork after reading
      > the rc-files because a user may add "f" to 'guioptions'.  Now, my
      > question is: does anybody really _need_ this functionality?  If we
      > crippled this option we could fork right after parsing the command
      > line arguments and it would fix the above problems and potentially
      > others (that we do not yet know about) as well.  Another side-effect
      > of this is that we don't have to perform initializations twice which
      > would cut down on startup times.
      > I would be much more comfortable with this solution.  Comments?

      Here's what I wrote a year ago on this subject:

      In short, forking earlier has its problems too. You probably don't
      want to do command line flag handling yourself (so that things like "-
      gf" vs "-fg" and "-f" after "--remote" etc are handled correctly). But
      vim might already modify the environment when parsing command line
      flags, so parts of the environment might need to be restored even if
      forking earlier.

      To me, this sound like trading one can of worms for another.

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