diff --git a/files/.tmux.conf b/files/.tmux.conf new file mode 100644 index 0000000..870f197 --- /dev/null +++ b/files/.tmux.conf @@ -0,0 +1,46 @@ +# Set $TERM env +set -g default-terminal "screen-256color" + +# Set prefix to ^A +unbind C-b +set -g prefix C-a +bind C-a send-prefix + +# Navigation +## Navigation in panes with C+hjkl integrated with vim +bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L" +bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D" +bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U" +bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R" +## Navigation in windows with alt+shift+jk +bind -n M-j select-window -p +bind -n M-k select-window -n + +# Splitting +unbind % +unbind '"' +bind | split-window -h +bind - split-window -v + +# Set window notifications +setw -g monitor-activity on +set -g visual-activity on + +# Reload tmux conf +unbind r +bind r source-file ~/.tmux.conf \; display-message " Config reloaded". + + +# Status bar +set status-bg colour237 +set status-fg colour216 +set-option -g status-left '#[fg=colour196][#[fg=default]#S#[fg=colour196]]#[fg=default] ' +set-option -g status-right \ +'#[fg=colour196][#[fg=default]#(whoami)#[fg=colour196]@\ +#[fg=default]#h#[fg=colour196]]#[fg=default] \ +#[fg=colour196][#[fg=default]#(date "+%H:%M %F")#[fg=colour196]]#[fg=defaultb' + +# Current window +set-window-option -g window-status-current-bg colour215 +set-window-option -g window-status-current-fg colour88 +set-window-option -g window-status-current-format ' #I:#W#F ' diff --git a/files/.vimrc b/files/.vimrc index 36f41ee..d879d81 100644 --- a/files/.vimrc +++ b/files/.vimrc @@ -21,10 +21,11 @@ set wildmenu " Splitting set splitbelow set splitright -nnoremap -nnoremap -nnoremap -nnoremap +"" Replaced by christoomey/vim-tmux-navigator +" nnoremap +" nnoremap +" nnoremap +" nnoremap set exrc set secure @@ -60,6 +61,7 @@ Plugin 'vim-airline/vim-airline-themes' "Plugin 'davidhalter/jedi-vim' Plugin 'vim-scripts/a.vim' Plugin 'rhysd/vim-clang-format' +Plugin 'christoomey/vim-tmux-navigator' call vundle#end() " required filetype plugin indent on " required