diff --git a/tmux/tmux.conf b/tmux/tmux.conf index dc156d5..f602e16 100644 --- a/tmux/tmux.conf +++ b/tmux/tmux.conf @@ -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-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" -# 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. # Note that to get command mode you need to hit ESC twice... diff --git a/vim/settings/vim-tmux-navigator.vim b/vim/settings/vim-tmux-navigator.vim new file mode 100644 index 0000000..ead6707 --- /dev/null +++ b/vim/settings/vim-tmux-navigator.vim @@ -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 . +" conflicts with NERDTree "current file". + +nnoremap :TmuxNavigateLeft +nnoremap :TmuxNavigateDown +nnoremap :TmuxNavigateUp +nnoremap :TmuxNavigateRight diff --git a/vim/settings/yadr-keymap.vim b/vim/settings/yadr-keymap.vim index 9cfde94..f142d3e 100644 --- a/vim/settings/yadr-keymap.vim +++ b/vim/settings/yadr-keymap.vim @@ -90,11 +90,12 @@ nnoremap ,x :bn " ============================== " Window/Tab/Split Manipulation " ============================== -" Move between split windows by using the four directions H, L, I, N -nnoremap h -nnoremap l -nnoremap k -nnoremap j +" Move between split windows by using the four directions H, L, K, J +" NOTE: This has moved to vim/settings/vim-tmux-navigator.vim. +" nnoremap h +" nnoremap l +" nnoremap k +" nnoremap j " Make gf (go to file) create the file, if not existent nnoremap gf :e