Closed schontz closed 1 year ago
For anyone who might come across this, I ended up with something like the following:
" Disable tmux navigator when zooming the Vim pane
let g:tmux_navigator_disable_when_zoomed = 1
" Use custom mappings
let g:tmux_navigator_no_mappings = 1
function! NavLeft()
if tabpagewinnr(tabpagenr(), '$') == 1
execute ":bp"
else
execute ":TmuxNavigateLeft"
endif
endfunction
function! NavRight()
if tabpagewinnr(tabpagenr(), '$') == 1
execute ":bn"
else
execute ":TmuxNavigateRight"
endif
endfunction
nnoremap <silent> <C-h> :call NavLeft()<cr>
nnoremap <silent> <C-l> :call NavRight()<cr>
Before I discovered this wonderful plugin, I had the following maps:
This is handy for me in the workflow of "has nerd tree and one buffer open"
Ideally, I would like to use a combo of these and the plugin:
I know the answer is probably fork it, but thought I would just throw this out there anyway.
Thanks for all the wonderful work.