vim/autoload/tmux.vim
Kenneth Benzie (Benie) 7af8660355 Also set tmux navigation flag on FocusGained
Make using the `@vim$TMUX_PANE` window flag much more robust by
unsetting it every time the zsh prompt is drawn and setting it again
using a `FocusGained` `autocmd` in vim. This removes the need for the
hacky check for zsh in the conditional defined in the `in_vim` variable.
2019-08-16 21:58:38 +01:00

10 lines
295 B
VimL

let s:tmux_option = '@vim'.substitute($TMUX_PANE, '%', '\\%', 'g')
function! tmux#setNavigationFlag() abort
call system('tmux set-window-option '.s:tmux_option.' 1')
endfunction
function! tmux#unsetNavigationFlag() abort
call system('tmux set-window-option -u '.s:tmux_option)
endfunction