Browse Source

Update tmux config

Signed-off-by: Ein Verne <[email protected]>
pull/4/head
Ein Verne 5 years ago
parent
commit
7bae50003d
  1. 13
      .vim/startup/plugin_vimrc
  2. 26
      tmux/.tmux.conf

13
.vim/startup/plugin_vimrc

@ -43,6 +43,12 @@ let g:NERDCommentEmptyLines = 1
" Enable trimming of trailing whitespace when uncommenting " Enable trimming of trailing whitespace when uncommenting
let g:NERDTrimTrailingWhitespace = 1 let g:NERDTrimTrailingWhitespace = 1
" Highlight Cursor line
let g:NERDTreeHighlightCursorline = 1
" Show hidden files
let NERDTreeShowHidden=1
" NERDTree will recursively open dirs with only one child
let NERDTreeCascadeOpenSingleChildDir=1
"" airline settings. "" airline settings.
@ -65,3 +71,10 @@ let g:airline#extensions#tabline#enabled = 1
let g:airline_section_c = '%<%F%m %#__accent_red#%{airline#util#wrap(airline#parts#readonly(),0)}%#__restore__#' let g:airline_section_c = '%<%F%m %#__accent_red#%{airline#util#wrap(airline#parts#readonly(),0)}%#__restore__#'
" show tab number in tab line " show tab number in tab line
let g:airline#extensions#tabline#tab_nr_type = 1 let g:airline#extensions#tabline#tab_nr_type = 1
" Write all buffers before navigating from Vim to tmux pane
let g:tmux_navigator_save_on_switch = 2
" Disable tmux navigator when zooming the Vim pane
let g:tmux_navigator_disable_when_zoomed = 1

26
tmux/.tmux.conf

@ -93,19 +93,20 @@ bind-key -t vi-copy 'y' copy-selection
# Smart pane switching with awareness of Vim splits. # Smart pane switching with awareness of Vim splits.
# See: https://github.com/christoomey/vim-tmux-navigator # See: https://github.com/christoomey/vim-tmux-navigator
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ # is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'" # | 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-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-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-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 -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
# bind-key -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l" # bind-key -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
bind-key -T copy-mode-vi C-h select-pane -L # 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-j select-pane -D
bind-key -T copy-mode-vi C-k select-pane -U # bind-key -T copy-mode-vi C-k select-pane -U
bind-key -T copy-mode-vi C-l select-pane -R # bind-key -T copy-mode-vi C-l select-pane -R
# bind-key -T copy-mode-vi C-\ select-pane -l # bind-key -T copy-mode-vi C-\ select-pane -l
bind C-l send-keys 'C-l'
# -------------------------------- color begin -------------------------------- # -------------------------------- color begin --------------------------------
@ -159,6 +160,8 @@ if "test ! -d ~/.tmux/plugins/tpm" \
set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible' set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank' set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'christoomey/vim-tmux-navigator'
# Other examples: # Other examples:
# set -g @plugin 'github_username/plugin_name' # set -g @plugin 'github_username/plugin_name'
@ -168,3 +171,6 @@ set -g @plugin 'tmux-plugins/tmux-yank'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm' run '~/.tmux/plugins/tpm/tpm'
set -g @open-S 'https://www.google.com/search?q='

Loading…
Cancel
Save