Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Directory Diffing #286

Open
rgrinberg opened this issue Jan 15, 2023 · 4 comments
Open

Directory Diffing #286

rgrinberg opened this issue Jan 15, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@rgrinberg
Copy link

rgrinberg commented Jan 15, 2023

Would it be possible to view diffs using this plugin outside the context of VCS? In particular, I'd like to diff two directories and browse the diff using the diffview UI.

I'd like to replace my current use of https://github.com/will133/vim-dirdiff with this plugin

@rgrinberg rgrinberg changed the title Directoy Diffing Directory Diffing Jan 15, 2023
@sindrets
Copy link
Owner

We could potentially allow passing the --no-index flag to :DiffviewOpen which would solve this:

       git diff [<options>] --no-index [--] <path> <path>
           This form is to compare the given two paths on the filesystem. [...]

But I believe this would require a fair amount of refactoring, as a lot of the git adapter code requires a reference to a git repository.

I'll consider it in the future.

@sindrets sindrets added the enhancement New feature or request label Jan 15, 2023
@rgrinberg
Copy link
Author

rgrinberg commented Jan 15, 2023

Right, that would be pretty neat. It would also be pretty good to navigate a diff loaded from a patch file. It's not such a common workflow anymore, but I do run into patches from time to time.

Thanks for the great plugin!

@sindrets
Copy link
Owner

The patch file idea is interesting. Feel free to open an issue about it so that we can track it separately.

@NeilGirdhar
Copy link

NeilGirdhar commented Mar 28, 2023

This would be a fantastic change. I need to keep vim running just for dir-diff. (I can't use dir-diff with Neovim because it is confused by the folding will133/vim-dirdiff#39.)

That said, if you do support dir-diffs, it would be great to somehow preserve the configuration files that guide linters and text editing, like: .editorconfig and pyproject.toml. Without these, linters are completely confused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants