-
Notifications
You must be signed in to change notification settings - Fork 356
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
Navigate regexp #782
Navigate regexp #782
Conversation
5212b0b
to
0d9f103
Compare
Indeed, the So if I understand correctly, this can make navigation more fine grained by passing something that matches every line? Do you have ideas for other possible regexes which improve navigation? I've also been playing around with this and want to add a nav marker every term-height/2 changed lines to still be able to jump around when using a lot of context such as |
I'm wanting to avoid matching every line. With the current code, an option of As for smaller amounts of skipping, a |
Apart from the "expert mode" of specifying the navigate-regex directly, might it make sense to specify the navigation stop types in a more user friendly way?
Thanks, great idea! |
Great, thanks! I'll merge when the tests pass. |
That is an interesting idea, since you could then leave hunk off the list without hard-wiring the other labels to particular values. That makes me think that some kind of normally invalid regex idiom, such as
(though the default does also auto-remove empty labels and their prior vertical bar). To avoid the stop-on-every-line issue with this regex idiom, an empty label could be turned into something like |
Unset features: - unset hunk-label, to skip hunk when using navigate jump. See: dandavison/delta#782 - unset hyperlinks-file-link-format, I do not want to open file when hyperlinks is enable. Use merge.conflictstyle is diff3 to enable conflict in delta. Add alias `gds` and `gdas` to show side-by-side in diff
In my navigating of delta diffs, I'd prefer to not stop at each hunk. My first thought was to override the navigate_regexp value, but it wasn't configurable. Then I had the idea to change the hunk-label to an empty string, which then made n/N stop at every line.
This branch makes the following changes:
With these changes I've chosen to not override navigate-regexp and to just force hunk-label to an empty string in my git config. This avoids stopping at each hunk while also making it easy to manually specify an override --hunk-label option when I want to change my mind. So, if you don't like the first commit in this branch (making navigate_regexp an option) the other 2 commits are good enough for my needs.