vim-tmux-focus-events icon indicating copy to clipboard operation
vim-tmux-focus-events copied to clipboard

Statusline problem

Open sblask opened this issue 8 years ago • 3 comments

Just tried to install vim-tmux-focus-events and the FocusGained seems to work, however, I get problems when moving through a file. The status line moves when I for example use Ctrl-D or j at the end of the page and part of the buffer gets scrambled. At first I thought it's some incompatibility with the bling/vim-airline plugin, but the problem persists even when I remove all the plugins from my config(apart from vim-tmux-focus-events). Relevant configs are: https://github.com/sblask/dotfiles/blob/master/vimrc.dotfile and https://github.com/sblask/dotfiles/blob/master/tmux.conf.dotfile I am currently using tmux 2.0 and vim 7.4.942 Any idea what could be wrong?

sblask avatar Dec 16 '15 17:12 sblask

Hey, unfortunately I don't know why that happens.. messing with status line seems pretty invasive and I don't know how this plugin could cause that..

Quick question for a line from your vimrc, what does this mystical line do:

autocmd FocusGained * silent execute '!echo -e -n "\x1b[\x31 q"' | silent execute '!echo ""'

bruno- avatar Dec 27 '15 00:12 bruno-

This is exactly what I wanted to have the focus gained working for. I have tmux/vim setup so the cursor is a block in normal mode and a pipe in insert mode. Which works fine unless I do a ctrl-zand bring vim back with fg vim will then show a pipe even though its in normal mode. It's a small detail, but it would have been nice to get that working...

sblask avatar Dec 29 '15 01:12 sblask

@sblask Not sure if this helps, but testing for mode() helped me overcome this issue. I suffered it from the perspective of tmux and switching panes. Here's a link to the relevant section of my vimrc:

https://github.com/kyounger/dotfiles/blob/b153a9aaa77e100db7dfb12e84873ff5f7954198/vim/.vimrc#L1265-L1274

kyounger avatar Feb 06 '19 18:02 kyounger