From 2f0046f9018aa91c7fbd4ebdf9523b70a146dd1c Mon Sep 17 00:00:00 2001 From: id101010 Date: Wed, 12 Oct 2016 13:15:02 +0200 Subject: [PATCH] Added vim style shortcuts to tmux --- tmux/tmux.conf | 71 +++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 58 insertions(+), 13 deletions(-) diff --git a/tmux/tmux.conf b/tmux/tmux.conf index 6775c97..afecc9b 100644 --- a/tmux/tmux.conf +++ b/tmux/tmux.conf @@ -1,21 +1,67 @@ -# status bar colors etc +## +## Basic Options +## + +set -g prefix ^a +set -g status-keys vi +setw -g mode-keys vi + +# Shut up! +set -g bell-action none +set -g bell-on-alert off +set quiet off + +# Fix terminal name issues +set -s escape-time 1 + +## +## Key bindings +## +# Reload configuration +bind r source-file ~/.tmux.conf + +# Panel splites and selection +unbind % +bind g split-window -h +unbind '"' +bind v split-window -v +unbind o +bind-key -n C-g last-window +bind-key -n C-b previous-window +bind-key -n C-n next-window +bind n next-window +bind b previous-window + +# Move around panes with hjkl, as one would in vim +bind h select-pane -L +bind j select-pane -D +bind k select-pane -U +bind l select-pane -R + +# Resize +bind H resize-pane -L 5 +bind J resize-pane -D 5 +bind K resize-pane -U 5 +bind L resize-pane -R 5 + +# Kill +bind q kill-window +bind Q kill-session + + +## +## Appearance +## +# set-option -g status-bg black set-option -g status-fg blue set-option -g status-interval 5 set-option -g visual-activity on + set-window-option -g monitor-activity on set-window-option -g window-status-current-fg white - -# command prefix -set -g prefix C-a - -# start window indexing at one instead of zero -set -g base-index 1 - -unbind % # remove default binding since replacing -bind v split-window -h -bind h split-window -v -bind R source-file ~/.tmux.conf \; display-message "Config reloaded..." +set -g message-fg black +set -g message-bg yellow # statusbar settings - adopted from tmuxline.vim and vim-airline - Theme: murmur set -g status-justify "left" @@ -37,4 +83,3 @@ set -g status-left "#[fg=colour15,bg=colour27] #S #[fg=colour27,bg=colour234,nob set -g status-right "#[fg=colour237,bg=colour234,nobold,nounderscore,noitalics]#[fg=colour144,bg=colour237] %d.%m.%Y %H:%M #[fg=colour27,bg=colour237,nobold,nounderscore,noitalics]#[fg=colour15,bg=colour27] #h " setw -g window-status-format "#[fg=colour39,bg=colour234] #I #[fg=colour39,bg=colour234] #W " setw -g window-status-current-format "#[fg=colour234,bg=colour237,nobold,nounderscore,noitalics]#[fg=colour144,bg=colour237] #I #[fg=colour144,bg=colour237] #{pane_current_path} #[fg=colour144,bg=colour237] #W #[fg=colour237,bg=colour234,nobold,nounderscore,noitalics]" -