TMUX
Split panes, create new tabs, and move between them quickly and easily! This should be installed by default, but can be installed with sudo apt-get install tmux
if it does not exist.
Config
Use touch ~/.tmux.conf
to create the configuration file.
set -g escape-time 10
set-option -sa terminal-overrides ",xterm*:Tc"
set -g default-terminal xterm-256color
# Smart pane switching with awareness of Vim splits.
# See: https://github.com/christoomey/vim-tmux-navigator
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind-key -T copy-mode-vi C-h select-pane -L
bind-key -T copy-mode-vi C-j select-pane -D
bind-key -T copy-mode-vi C-k select-pane -U
bind-key -T copy-mode-vi C-l select-pane -R
# # Make splits better
# bind | split-window -h -c "#{pane_current_path}"
# bind - split-window -v -c "#{pane_current_path}"
#
# source "/usr/share/powerline/bindings/tmux/powerline.conf"
Open TMUX by Default
Answer found here.
Put this into config.fish
and restart.
if status is-interactive
and not set -q TMUX
exec tmux
end