Is there an easy way to diff two fragments of code in two buffers?
DwigtArmyOfChampions <[email protected]> Thu, 17 Apr 2025 03:35:35 -0700 (PDT)
| Newsgroups | gmane.editors.vim |
|---|---|
| Message-ID | <[email protected]> |
I have two buffers open in vim. I want to compare a subroutine that's present in both buffers for differences. I don't care about the rest of the two files, they're very different. I only care about this subroutine. Is there an easy way to diff just this part of the code? I could go into Visual mode, yank the subroutine of buffer1, create a new file in my temp directory called sub_buffer1.txt, Put the code, save it, then switch to buffer2, go to visual mode, yank that buffer's subroutine code, create a new file in my temp directory called sub_buffer2.txt, Put that code, save it, exit Vim, then run vimdiff on sub_buffer1.txt and sub_buffer2.txt. Is there an easier way? -- -- 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 [email protected]. To view this discussion visit https://groups.google.com/d/msgid/vim_use/4cae8753-6669-42f5-b2b0-5da749e14f73n%40googlegroups.com.