vimdiff: show only difference between “base” and “remote”

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I'm merging two branches in a project, which both changed the same part of some files in different ways. The "remote" branch is somewhat closer to the common ancestor ("base"), so I want to only show the differences between "base" and "remote"; by default, all lines different in any two files (I think) are highlighted, leaving a large region of highlighting with little useful information. Can I do this?



It would be better if I can simultaneously show the difference between "base" and "remote", and between "local" and "merged"; essentially, two diff sessions in one vim. Is this possible?







share|improve this question
























    up vote
    0
    down vote

    favorite












    I'm merging two branches in a project, which both changed the same part of some files in different ways. The "remote" branch is somewhat closer to the common ancestor ("base"), so I want to only show the differences between "base" and "remote"; by default, all lines different in any two files (I think) are highlighted, leaving a large region of highlighting with little useful information. Can I do this?



    It would be better if I can simultaneously show the difference between "base" and "remote", and between "local" and "merged"; essentially, two diff sessions in one vim. Is this possible?







    share|improve this question






















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I'm merging two branches in a project, which both changed the same part of some files in different ways. The "remote" branch is somewhat closer to the common ancestor ("base"), so I want to only show the differences between "base" and "remote"; by default, all lines different in any two files (I think) are highlighted, leaving a large region of highlighting with little useful information. Can I do this?



      It would be better if I can simultaneously show the difference between "base" and "remote", and between "local" and "merged"; essentially, two diff sessions in one vim. Is this possible?







      share|improve this question












      I'm merging two branches in a project, which both changed the same part of some files in different ways. The "remote" branch is somewhat closer to the common ancestor ("base"), so I want to only show the differences between "base" and "remote"; by default, all lines different in any two files (I think) are highlighted, leaving a large region of highlighting with little useful information. Can I do this?



      It would be better if I can simultaneously show the difference between "base" and "remote", and between "local" and "merged"; essentially, two diff sessions in one vim. Is this possible?









      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 20 '17 at 4:09









      Imperishable Night

      1134




      1134




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote



          accepted










          I workaround this issue by using a tmux



          1. open a tmux

          2. split the tmux horizontally using ctrl-a-double_quote

          3. open vimdiffs individually

          of course , you have to manage scrolling between the windows yourself - but that is the best shot with native vimdiff.






          share|improve this answer




















          • I just learned about tmux today, and that's definitely a fine way to do it! I was about to ask how to do this with git mergetool, then I realized I can just run :!tmux from the vim spawned by the mergetool, and be ready to go :)
            – Imperishable Night
            Nov 22 '17 at 0:33










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f405704%2fvimdiff-show-only-difference-between-base-and-remote%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote



          accepted










          I workaround this issue by using a tmux



          1. open a tmux

          2. split the tmux horizontally using ctrl-a-double_quote

          3. open vimdiffs individually

          of course , you have to manage scrolling between the windows yourself - but that is the best shot with native vimdiff.






          share|improve this answer




















          • I just learned about tmux today, and that's definitely a fine way to do it! I was about to ask how to do this with git mergetool, then I realized I can just run :!tmux from the vim spawned by the mergetool, and be ready to go :)
            – Imperishable Night
            Nov 22 '17 at 0:33














          up vote
          0
          down vote



          accepted










          I workaround this issue by using a tmux



          1. open a tmux

          2. split the tmux horizontally using ctrl-a-double_quote

          3. open vimdiffs individually

          of course , you have to manage scrolling between the windows yourself - but that is the best shot with native vimdiff.






          share|improve this answer




















          • I just learned about tmux today, and that's definitely a fine way to do it! I was about to ask how to do this with git mergetool, then I realized I can just run :!tmux from the vim spawned by the mergetool, and be ready to go :)
            – Imperishable Night
            Nov 22 '17 at 0:33












          up vote
          0
          down vote



          accepted







          up vote
          0
          down vote



          accepted






          I workaround this issue by using a tmux



          1. open a tmux

          2. split the tmux horizontally using ctrl-a-double_quote

          3. open vimdiffs individually

          of course , you have to manage scrolling between the windows yourself - but that is the best shot with native vimdiff.






          share|improve this answer












          I workaround this issue by using a tmux



          1. open a tmux

          2. split the tmux horizontally using ctrl-a-double_quote

          3. open vimdiffs individually

          of course , you have to manage scrolling between the windows yourself - but that is the best shot with native vimdiff.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 20 '17 at 6:11









          amisax

          1,363314




          1,363314











          • I just learned about tmux today, and that's definitely a fine way to do it! I was about to ask how to do this with git mergetool, then I realized I can just run :!tmux from the vim spawned by the mergetool, and be ready to go :)
            – Imperishable Night
            Nov 22 '17 at 0:33
















          • I just learned about tmux today, and that's definitely a fine way to do it! I was about to ask how to do this with git mergetool, then I realized I can just run :!tmux from the vim spawned by the mergetool, and be ready to go :)
            – Imperishable Night
            Nov 22 '17 at 0:33















          I just learned about tmux today, and that's definitely a fine way to do it! I was about to ask how to do this with git mergetool, then I realized I can just run :!tmux from the vim spawned by the mergetool, and be ready to go :)
          – Imperishable Night
          Nov 22 '17 at 0:33




          I just learned about tmux today, and that's definitely a fine way to do it! I was about to ask how to do this with git mergetool, then I realized I can just run :!tmux from the vim spawned by the mergetool, and be ready to go :)
          – Imperishable Night
          Nov 22 '17 at 0:33

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f405704%2fvimdiff-show-only-difference-between-base-and-remote%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay