How can I have different line-numbers format for unified/side-by-side #749
-
Hello, I usually use the unified layout but sometimes want to enable the side-by-side layout. The way I enable the SBS layout is with git aliases like Currently I have: (reduced to minimal) [delta]
features = decorations
[delta "decorations"]
line-numbers-left-format = {nm:^5}|
line-numbers-right-format = {np:^5}│ which is perfect for the unified layout, but not so great for SBS (I'd like Is it possible to have different |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
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: As you can imagine, specifying the precise behavior when you start adding multiple features ( |
Beta Was this translation helpful? Give feedback.
Hi @bew, yes the way to achieve these sorts of conditional customizations is to use delta's "features" feature. Here's an example:
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
),…