Feature request: navigation keybindings
summary
add option to prepend labels (i.e. rare unicode symbols) to filenames/hunks
now if you set pager to less "+/$PATTERN"$'\ng', where $PATTERN matches the label(s), you can jump between files/hunks with n/N
motivation
spamming f gets annoying on large diffs with a lot of big irrelevant hunks
stolen from
delta's navigate:
- idea in the manual
- detailed description of related flags in the help output
workaround
without labels you could use:
--- \S+$for hunks(?<! --- ([2-9]|\d{2,6})/\d{1,6}) --- \S+($| [^-])for files (as long as you have less than 10e6 hunks and the regex flavor supports all the magic)
idk how I didn't think of that earlier, but you can just wrap difft with a script
printf '\u2063'
exec difft "$@"
and then set the pager to less -p $'\u2063', where U+2063 is the invisible separator character; hunks are still a problem though
The above script would need to iterate over the parameters in $@ and printf between each single file invocation of difft if I understand your idea correctly, right?