-1

If I click on a line, I can see "19m" or "18m" etc. show up in the bottom right of the screen. If I scroll, nothing happens, but shift+click&drag works.

set encoding=utf8                                                                                    
set ttym=xterm2
set mouse=a

I've tried a few variations of the above but nothing looks different.

I'm using a config file that worked on Ubuntu, so this change is odd.

I'm using the Tilda terminal emulator, with tmux inside, to interact with vim. Specifically, tmux -2 wrapped around zsh running vim.

bash TERM=mlterm, tmux/zsh TERM=xterm-256color

6
  • Hey John, please don't add such important information to the comments alone! Instead, in general, add them to your question by editing it, please! I've done that for you in this case :) Commented Dec 21, 2023 at 11:47
  • Can you include the output of echo $TERM in your terminal emulator both outside of tmux and within tmux? That will help us figure out if that's related to your problem (as I suspect it might be).
    – bk2204
    Commented Dec 21, 2023 at 13:34
  • @bk2204 From bash, mlterm. From zsh & tmux+zsh, xterm-256color. I definitely want 256-color support if possible.
    – John P
    Commented Dec 21, 2023 at 23:04
  • @bk2204 Bounty is active if you have a minute
    – John P
    Commented Dec 25, 2023 at 0:07
  • Does it work if you set TERM=tmux-256color or TERM=screen-256color in tmux? xterm-256color is not correct for inside of tmux.
    – bk2204
    Commented Dec 26, 2023 at 0:27

1 Answer 1

1
+50

The TERM environment variable controls what character sequences are sent and received by programs and the proper value depends on the terminal emulator. Inside tmux, you generally want one of the tmux-* or screen-* values, preferably the former. If you change to the correct terminal type, this will probably work as expected.

In most cases, tmux-direct is the most featureful (it supports true colour), but not all systems support it. tmux-256color is an option on many modern systems, and you can also use screen-256color in a pinch. To verify whether a terminal definition is available on your system, you can run infocmp tmux-direct (or whatever value you like) and that will either print the definition (if it's available) or a message that it's not available.

Note that if you SSH into older machines, it may be better to set one of the 256-colour modes instead of tmux-direct since the TERM setting is copied over by default and having a value that doesn't exist on the machine can break most terminal-using programs, including your shell.

To set the default terminal type in tmux, you can use set -g default-terminal tmux-256color in ~/.tmux.conf.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .