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

Re: vimdiff, then :tabe %, doesn't work as expected.

Expand Messages
  • Tony Mechelynck
    ... Yes and no. If you have several windows on a single file, it s a single buffer, so buffer-local variables and options ( fileencoding , bomb ,
    Message 1 of 7 , Nov 2, 2008
    View Source
    • 0 Attachment
      On 03/11/08 03:02, Ian Kelling wrote:
      >
      >> :tab sp
      >>
      >> Does that fix it?
      >>
      >> Also, did you try the<C-W>s<C-W>T alternative? Did that work?
      >
      > Those both fix the fold breaking in the first window. I think the
      > folding breaking is the only bug, and quite minor since there are
      > multiple work arounds. It seems limited to the :edit command. I did
      > some work on the bug you mention and I will have to look at it check
      > the todo list.
      >
      > The fact that all the settings stay the same seems to be intended as
      > it works that way with every other command. Is there a way to edit a
      > file thats already being edited in a different window and have its
      > local settings be set as if it was a new file?
      >
      > - Ian

      Yes and no. If you have several windows on a single file, it's a single
      buffer, so buffer-local variables and options ('fileencoding', 'bomb',
      'fileformat', 'filetype', 'syntax', 'synmaxcol' etc.) are common but
      window-local variables and options ('list', 'rightleft', 'diff',
      'foldmethod' etc.) are distinct.

      Best regards,
      Tony.
      --
      Chef, n.:
      Any cook who swears in French.

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_dev" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Ben Schmidt
      ... It s actually a bit weirder than that. Read :help local-options for the details on how it all works. I don t think you can easily set them as if for a new
      Message 2 of 7 , Nov 2, 2008
      View Source
      • 0 Attachment
        > The fact that all the settings stay the same seems to be intended as
        > it works that way with every other command. Is there a way to edit a
        > file thats already being edited in a different window and have its
        > local settings be set as if it was a new file?

        It's actually a bit weirder than that. Read :help local-options for the
        details on how it all works. I don't think you can easily set them as if
        for a new file. I suppose what we want is for

        :setlocal all<

        to work. I might look and see if this might be easy to add. I don't
        suppose it would be too hard.

        Ben.




        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_dev" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      Your message has been successfully submitted and would be delivered to recipients shortly.