akracun/tmux — pull request #1 by aaronjensen (2013-02-18 23:38:09+00:00)
Title: Focus notify

So I got it working. Unfortunately I don't think it'll work for my use case because vim's autocmd FocusLost doesn't happen fast enough to send the escape code to the terminal. I'm not sure how to work around that.

These are what I'm using:

```viml
autocmd FocusGained * execute "silent !printf '" . WrapForTmux("\e[?2004h") . "'"
autocmd FocusLost * execute "silent !printf '" . WrapForTmux("\e[?2004l") . "'"
```