@@ -114,3 +114,27 @@ Control sequences in tmux (like `\e]0;title\\\e`) modify the session name.
## I want tabs/windows of different sizes.
Turn on **Prefs > Advanced > Allow variable window sizes in tmux integration**. Ensure you have the most recent version of tmux installed. As of the 10/31/2019 nightly build or 3.3.7beta3 this should work reasonably well but there might be bugs. Please report them at https://iterm2.com/bugs and attach an as-minimal-as-possible debug log.
## Italics show up as reverse video, whole-screen reverse video isn't working, or my `$TERM` variable is not what I wish
First, some background:
* Your terminal type is determined by the `TERM` environment variable.
* There are two families of terminals: xterm and screen. They vary in small ways. For example, the control sequence that indicates italic text in `xterm` is used for reverse video in `screen`.
* iTerm2 supports xterm-family control sequences.
* By default `tmux` uses `screen`.
* Within tmux integration, iTerm2 attempts to detect your `TERM` and translate `screen`-style codes into `xterm`-style codes before processing them. For example, it rewrites italic -> reverse video.
Some users prefer to use `TERM=xterm-256color` (or any other xterm-family terminal) in tmux. In order for this to work well, you'll want to disable the screen->xterm translation in iTerm2.
iTerm2 automatically determines what terminal tmux is configured to use by querying tmux's `default-terminal` setting. If it contains the string "screen" then control sequences get translated.
If you change your `TERM` to `xterm` (or an xterm-family terminal) in your `.bashrc` or equivalent, neither tmux nor iTerm2 will be aware of it. Consequently, it will appear to be `screen` to iTerm2 but `xterm` to the program that is sending control sequences. iTerm2 will the translate them when it oughtn’t.
To set your `TERM` properly you should set tmux's `default-terminal` property, ideally in `~/.tmux.conf`. This makes it visible to iTerm2 and solves the problem. To do so, place this in your `~/.tmux.conf`: