0

It seems like I can't unbind/rebind keys. In this scenario, I'm trying to change the split-window keys, but tmux doesn't seem to honor my config file.

For example, I'll try to 'split-window -v' via Ctrl+b -, but the tmux status bar spits out 'No buffer', meaning that it still has the default action of 'Delete the most recent paste buffer ' for Ctrl+b -

Here is my ~/.tmux.conf file contents:

unbind - 
unbind '"'
unbind %
bind | split-window -h
bind - split-window -v

I've tried calling out my conf file just in case tmux for some reason wasn't loading my conf file, but to no avail:

$ tmux -f ~/.tmux.conf

Ctrl+b ? output shows that none of my rebindings are loaded.

Running tmux 3.2a on Ubuntu 22.04.3.

  • 2
    tmux -f ~/.tmux.conf creates a new tmux session, but the -f will work only if the command also starts a new tmux server, which will happen if there is no server already. If there is a tmux server, you can tell it to parse the file again by invoking tmux source-file ~/.tmux.conf. Does the problem exist when you handle this right? – Kamil Maciorowski Jan 12 '24 at 18:04
  • @KamilMaciorowski - My hero. tmux source-file ~/.tmux.conf did the trick. Embarrassingly I had another session open that I wasn't aware of. I guess because I had an unattached session still open, tmux wouldn't load the changes via tmux or tmux -f ~/.tmux.conf to the config file since a server was already running? – wabbajack001 Jan 12 '24 at 19:52
  • Yes. From the manual where it describes -f [emphasis mine]: "tmux loads configuration files once when the server process has started. The source-file command may be used to load a file later." – Kamil Maciorowski Jan 12 '24 at 20:04

0 Answers0