Skip to content

How can I have different line-numbers format for unified/side-by-side #749

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

You must be logged in to vote

Hi @bew, yes the way to achieve these sorts of conditional customizations is to use delta's "features" feature. Here's an example:

[delta]
    features = my-line-numbers

[delta "my-line-numbers"]
    line-numbers = true
    line-numbers-left-format = {nm:^5}|
    line-numbers-right-format = {np:^5}│

[delta "my-side-by-side"]
    side-by-side = true
    line-numbers-left-format = │{nm:^5}│
    line-numbers-right-format = │{np:^5}│

Now, by default we have line numbers:

and we can activate side-by-side as you demonstrated: git -c delta.features=my-side-by-side ...

As you can imagine, specifying the precise behavior when you start adding multiple features (features = feature-1 feature-2),…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@bew
Comment options

Answer selected by bew
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