TMUX setting environment variables for sessions

I figured out a way to do this. I’m using tmux 2.5. Background In the tmux man page, it states that there are two groups of environment variables: global and per-session. When you create a new tmux session, it will merge the two groups together and that becomes the set of environment variables available within … Read more

Clipboard failure in tmux + vim after upgrading to MacOS Sierra

This seem to be a regression on macOS Sierra. A solution that worked for me has been mentioned by Josh McGinnis https://github.com/tmux/tmux/issues/543: brew install reattach-to-user-namespace Ensure the following is set in .tmux.conf: set -g default-shell $SHELL set -g default-command “reattach-to-user-namespace -l ${SHELL}” In .vimrc or ~/.config/nvim/init.vim (for Neovim): set clipboard=unnamed Now all is well and … Read more

What are the differences between set -g, set -ga and set-option -g in a .tmux.conf file?

set is the alias of set-option. set -g is used to set global options and -ga appends values to existing settings. From Tmux’s man page: With -a, and if the option expects a string or a style, value is appended to the existing setting. For example: set -g status-left “foo” set -ag status-left “bar” Will … Read more

give a hint when press prefix key in tmux

The development version of tmux has support for this, so the next release (1.8?) should also support it. There have been two changes that can be combined to indicate in your status line whether a prefix key has been pressed: You can include the extended “format” replacements in the values of the “status” options. These … Read more

Vim: Difference between t_Co=256 and term=xterm-256color in conjunction with TMUX

When you don’t use tmux or screen, you only need to configure your terminal emulators to advertise themselves as “capable of displaying 256 colors” by setting their TERM to xterm-256color or any comparable value that works with your terminals and platforms. How you do it will depend on the terminal emulator and is outside of … Read more