sjl / vitality.vim

Make Vim play nicely with iTerm 2 and tmux.
http://github.com/sjl/vitality.vim
MIT License
320 stars 30 forks source link

feature request: do FocusLost on tmux pane/window change #14

Open chrisberkhout opened 11 years ago

chrisberkhout commented 11 years ago

This would be fantastic... the dream of autosave fully realised.

I get the impression this is possible (and without requiring entering something in the shell, like https://github.com/pivotal/tmux-config requires), since tmux knows when it switches and it should be possible to attach some extra code at that point (possibly by remapping the original keys to a wrapper function).

For now my workaround is to put things that I want to autosave between in two different iTerm2 windows, and switch between them using the regular OSX shortcut (C-Tilde). Would really be nice to do within one window though.

If I get around to this myself I'll be sure to share it back here.

mxgrn commented 11 years ago

Any progress on this one?

justmytwospence commented 10 years ago

+1 if possible

unphased commented 9 years ago

Check out #21. set -g focus-events on makes this magic work by having tmux pass along the focus event-escape-sequence. Works in Tmux 1.9a. Totally goddamn epic.