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

Add a "ignore-space-change" Toggle switch #696

Closed
phgz opened this issue Dec 17, 2022 · 2 comments · Fixed by #893
Closed

Add a "ignore-space-change" Toggle switch #696

phgz opened this issue Dec 17, 2022 · 2 comments · Fixed by #893
Labels
enhancement New feature or request

Comments

@phgz
Copy link

phgz commented Dec 17, 2022

Sometimes, I wrap code around a function or conditional, and then apply indentation. The diff marks and preview show that all the block has been modified, and that does not help me when I want to know if something has been changed inside that block or not.

Solution:
Add a toggle option to switch between regular and "ignore-space-change" modes.

Alternatives:
At the moment, I simple do a "git diff --ignore-space-change" on the command line to have a better view of non-space changes.

I can try a PR if I'm given hints for directions!

@phgz phgz added the enhancement New feature or request label Dec 17, 2022
@lewis6991
Copy link
Owner

We should make sure to inherit any whitespace settings in 'diffopt'. We already do this for algorithm, linematch and indent heuristic

@phgz
Copy link
Author

phgz commented Dec 17, 2022

Ok I see, it should not be too complicated. I will start when I have time, thanks!

wookayin added a commit to wookayin/dotfiles that referenced this issue Oct 5, 2023
While I want to ignore whitespaces in normal diff windows (&diffopt),
git hunks (shown by gitsigns) shown for the current line should not
ignore whitespace changes to avoid any accidental whitespace changes.

See lewis6991/gitsigns.nvim#696
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment