Skip to content

How to jump to the next file header when viewing a multi-file diff through less? #1868

Closed Answered by dandavison
voidus asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @voidus, you've seen the navigate feature, right?

      --navigate
          Activate diff navigation.

          Use n to jump forwards and N to jump backwards. To change the file labels used see
          --file-added-label, --file-copied-label, --file-modified-label, --file-removed-label,
          --file-renamed-label.

      --navigate-regex <REGEX>
          Regular expression defining navigation stop points

So what you're aiming for is to use those settings to cause it to visit precisely the boundaries you want. Let me know what you come up with. I think that that particular requirement (file boundaries, but not within-file commit hunk boundaries) is one that's less obvious how…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by dandavison
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants