又仔细搜索了下,发现VSCode、Vim、Emacs、PyCharm或多或少都有一些解决方案:
- VSCode: GitHub - ryu1kn/vscode-partial-diff: Visual Studio Code Extension. Take a diff of 2 parts of text(s)
- Vim: GitHub - AndrewRadev/linediff.vim: A vim plugin to perform diffs on blocks of code
- Emacs: ediff - How do I compare regions in the same file? - Emacs Stack Exchange
- PyCharm: https://plugins.jetbrains.com/plugin/14544-more-actions