Open bruno- opened 9 years ago
Thanks,
Confirmed correct actions (FocusGain, FocusLost) on Terminal.app, OS 10.10
When you changed the .tmux.conf, make sure to reload or kill the tmux server. This caused me an hour to debug.
Unlike @bruno-, FocusLost also works seamlessly.
@bruno- @chrischoy My experience has been that FocusLost pretty much works, except that no matter what I tried I could not make it properly run echo
or echom
(while FocusGained had no problems with it). It is bizarre, but I am not about to lose sleep over it.
Hey, it's good to hear that FocusLost
works for you guys.. btw. how were you able to verify it works if echo
or echom
doesn't work?
I just tried and this au FocusLost * echom 'focus lost!'
doesn't work for me too.
au FocusLost * stopinsert
Thanks for sharing.. that one works!
On Tue, Mar 3, 2015 at 2:59 PM, Steven Lu notifications@github.com wrote:
au FocusLost * stopinsert
— Reply to this email directly or view it on GitHub https://github.com/sjl/vitality.vim/issues/28#issuecomment-76949529.
Hi, it seems I managed to get
FocusGained
work by using this plugin andtmux
. Steps for this are below and I'm still a bit fuzzy why\ this works.Tools:
How to enable
FocusGained
for terminal vim with the above tools:focus-events
option on:tmux set -g focus-events on
let g:vitality_always_assume_iterm = 1
That's it!
FocusGained
should now work. I've tested it with vim by setting the following autocommand:A couple observations:
FocusLost
does not work for some reasonTerminal.app
+ vim)If this plugin is still maintained, do you think we could add these instructions somewhere (wiki maybe) so people know this is possible? Also, how about enabling the plugin when vim is running inside
tmux
so thatlet g:vitality_always_assume_iterm = 1
is not required?