add tmux-vim-navigator plugin

This commit is contained in:
Jidbo 2018-12-22 15:28:44 +01:00
parent c4abd688a8
commit 1a8b0c1ed7
2 changed files with 13 additions and 6 deletions

9
.vimrc
View file

@ -1,9 +1,3 @@
" if empty(glob("~/.vim/bundle/Vundle.vim"))
" silent !git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
" autocmd GUIEnter * PluginInstall
" \ source ~/.vimrc
" endif
set nocompatible " required
filetype off " required
@ -17,6 +11,9 @@ Plugin 'gmarik/Vundle.vim'
" add all your plugins here (note older versions of Vundle
" used Bundle instead of Plugin)
" tmux navigator
Plugin 'christoomey/vim-tmux-navigator'
" Simply Fold
Plugin 'tmhedberg/SimpylFold'

View file

@ -2,6 +2,16 @@
# set vi keys
set-window-option -g mode-keys vi
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
# default statusbar colors
set-option -g status-bg black #base02