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.
This commit is contained in:
9
autoload/tmux.vim
Normal file
9
autoload/tmux.vim
Normal file
@@ -0,0 +1,9 @@
|
||||
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
|
||||
Reference in New Issue
Block a user