vim-tmux-focus-events
vim-tmux-focus-events copied to clipboard
Plugin affects vim `.` commands
trafficstars
Vim's Operator-Pending mode was interrupted when switching tmux focus.
prepare:
- start tmux and open 2 windows.
- start vim in first window of tmux.
steps:
- execute
cwabove words in vim. [test string:a:b] cursor on the character ofa. - switch to other tmux window.
- switch back to vim window.
- input some characters.(such as
z) - use
ESCto normal mode. [test string changed toz:b] - move cursor to the character of
b - use
.command result: [test string changed toz:zb] expect: [test string changed toz:z]
If skip the step 2 and 3, the result is expect. I think the vim exit and reenter insert mod when switch tmux window.
environments:
MacOS: 10.15.2 Vim: 8.2 Tmux: 3.0a
vim config:
.vimrc
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
call plug#begin('~/.vim/bundle')
Plug 'tmux-plugins/vim-tmux-focus-events'
call plug#end()
tmux config:
set -s focus-events on