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

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

Expand Messages
  • fritzophrenic
    ... If he s trying to accomplish what I do when I try this, here s the reasoning behind it: 1. I ve opened a diff of 2 files 2. I find a place I want to look
    Message 1 of 3 , Oct 30, 2008
      On Oct 29, 4:40 pm, Ben Schmidt <mail_ben_schm...@...> wrote:
      > Ian Kelling wrote:
      > > Doing vimdiff, then :tabe %, I find that the new window still has that
      > > left the foldcolumn, and the folding doesn't work in the original
      > > window where the file is diffed.
      > > It does work right if I open regular vim and do :tabe %, and
      > > then :diffsplit.
      > I think it's because the :tabe command works like :edit, it reloads the
      > file and loses its 'diff' settings. Try executing :diffthis in the
      > original window and :diffoff in the new tab to get it sorted out. I
      > think it will probably work.
      > :help :diffthis
      > :help :diffoff
      > Alternatively, perhaps <C-W>s<C-W>T would be a way to get a file into a
      > new tab without ':edit'ing it; that might not mess up the options in the
      > first place.
      > :help CTRL-W_s
      > :help CTRL-W_T
      > > How can I make it the way I would expect from a vimdiff?
      > If you're expecting to have diff working between two tab pages, then
      > you're out of luck; scrolling down a bit at :help diff you can find this
      > comment:
      > > Diffs are local to the current tab page |tab-page|.  You can't see diffs with
      > > a window in another tab page.  This does make it possible to have several
      > > diffs at the same time, each in their own tab page.
      > Cheers,
      > Ben.

      If he's trying to accomplish what I do when I try this, here's the
      reasoning behind it:

      1. I've opened a diff of 2 files
      2. I find a place I want to look at in more detail in one of the files
      3. The diff is interfering with my ability to look at just 1 file, so
      I want to view the file without the diff
      4. But, I want the diff to remain open for later, so
      5. I decide to open the file in a new tab, preferably without the
      diff, but leaving the diff open in the current tab

      But, if you just :tabe %, it doesn't work, as described.

      I've usually worked around this by fixing things up after the :tabe %
      using :diffthis and :diffoff, but I was also hoping there was a better
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
    Your message has been successfully submitted and would be delivered to recipients shortly.