Fixed keybinding conflict introduced as part of #526.

This commit is contained in:
Dan Simmons 2014-10-24 17:28:04 -04:00
parent 9e64c72eeb
commit dfb65f2177
3 changed files with 17 additions and 7 deletions

View File

@ -26,8 +26,7 @@ bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iqE
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys C-j) || tmux select-pane -D" bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys C-j) || tmux select-pane -D"
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys C-k) || tmux select-pane -U" bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys C-l) || tmux select-pane -R" bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys C-l) || tmux select-pane -R"
# Conflicts with Nerdtree binding. Can possibly add back later under a different alias. bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys 'C-\\') || tmux select-pane -l"
#bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys 'C-\\') || tmux select-pane -l"
# Use vi keybindings for tmux commandline input. # Use vi keybindings for tmux commandline input.
# Note that to get command mode you need to hit ESC twice... # Note that to get command mode you need to hit ESC twice...

View File

@ -0,0 +1,10 @@
" Don't allow any default key-mappings.
let g:tmux_navigator_no_mappings = 1
" Re-enable tmux_navigator.vim default bindings, minus <c-\>.
" <c-\> conflicts with NERDTree "current file".
nnoremap <silent> <c-h> :TmuxNavigateLeft<cr>
nnoremap <silent> <c-j> :TmuxNavigateDown<cr>
nnoremap <silent> <c-k> :TmuxNavigateUp<cr>
nnoremap <silent> <c-l> :TmuxNavigateRight<cr>

View File

@ -90,11 +90,12 @@ nnoremap <silent> ,x :bn<CR>
" ============================== " ==============================
" Window/Tab/Split Manipulation " Window/Tab/Split Manipulation
" ============================== " ==============================
" Move between split windows by using the four directions H, L, I, N " Move between split windows by using the four directions H, L, K, J
nnoremap <silent> <C-h> <C-w>h " NOTE: This has moved to vim/settings/vim-tmux-navigator.vim.
nnoremap <silent> <C-l> <C-w>l " nnoremap <silent> <C-h> <C-w>h
nnoremap <silent> <C-k> <C-w>k " nnoremap <silent> <C-l> <C-w>l
nnoremap <silent> <C-j> <C-w>j " nnoremap <silent> <C-k> <C-w>k
" nnoremap <silent> <C-j> <C-w>j
" Make gf (go to file) create the file, if not existent " Make gf (go to file) create the file, if not existent
nnoremap gf :e<cfile><CR> nnoremap gf :e<cfile><CR>