8

enter image description here

I need to swicth between landscape and portrait orientations in tig status view cause sometimes diff line doesn't fit to right part of view.

Evgen Druzhynin
  • 188
  • 2
  • 7
  • I'm a bit curious about how you got tig to use landscape mode, since I can't find anything about it in the documentation. How did you do? – iveqy Nov 07 '14 at 19:45
  • 2
    @iveqy Since version 2.0, Tig will (by default) automatically switch to landscape mode when the terminal is wider than 160 characters. – Jonas Fonseca Nov 10 '14 at 03:45
  • 2
    @iveqy Forgot to mention that landscape orientation is supported before version 2.0 by setting `vertical-split` to true in your `~/.tigrc`. – Jonas Fonseca Nov 10 '14 at 03:55

2 Answers2

21

You can change the orientation use the vertical-split option. In version 2.0, it is set to auto by default, which will use a heuristics to determine whether to use landscape or portrait orientation (note: in the Tig docs this is called horizontal and vertical split).

Following is the option's documentation for version 2.0:

vertical-split (mixed) [auto|]

Whether to split the view horizontally or vertically. "auto" (which is the default) means that it will depend on the window dimensions. When true vertical orientation is used, and false sets the orientation to horizontal.

Jonas Fonseca
  • 1,811
  • 15
  • 15
  • 1
    it is possible to fix the width of the left window in vertical split?, in order to give more space to the diff in the status view – Mauricio Sánchez Jul 15 '15 at 16:36
  • @mauricio-sánchez, add `set split-view-width = 60%` to `~/.tigrc` – Evmorov Sep 17 '19 at 21:56
  • 3
    Alternative values: `horizontal|vertical`. Add the line `set vertical-split = horizontal` to the `~/.tigrc` to always split horizontally – d9k Jan 26 '22 at 19:45
0

If you just want to have the possibility to view a single commit in landscape mode, you can select your commit in the main view and then press d, this will bring you to a full-screen diff view which is colored and scrollable.