diff --git a/.vim/startup/plugin_vimrc b/.vim/startup/plugin_vimrc index 04ff144..cac5462 100644 --- a/.vim/startup/plugin_vimrc +++ b/.vim/startup/plugin_vimrc @@ -43,6 +43,12 @@ let g:NERDCommentEmptyLines = 1 " Enable trimming of trailing whitespace when uncommenting 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. @@ -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__#' " show tab number in tab line 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 + diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index 8e64dd8..e415ceb 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -93,19 +93,20 @@ bind-key -t vi-copy 'y' copy-selection # 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" +# 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 -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-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 +# 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 # bind-key -T copy-mode-vi C-\ select-pane -l +bind C-l send-keys 'C-l' # -------------------------------- color begin -------------------------------- @@ -159,6 +160,8 @@ if "test ! -d ~/.tmux/plugins/tpm" \ set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tmux-sensible' set -g @plugin 'tmux-plugins/tmux-yank' +set -g @plugin 'tmux-plugins/tmux-open' +set -g @plugin 'christoomey/vim-tmux-navigator' # Other examples: # 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) run '~/.tmux/plugins/tpm/tpm' + +set -g @open-S 'https://www.google.com/search?q=' +