0

I'm using Vim with tmux and I wanted to know if there was a signal or something to 'deactivate' the vim window (like when you switch between vim windows) but also when you switch between Vim and Tmux. I'm using vim-tmux-navigator and tried to modify it to have this effect.

  • 2
    Welcome to Vi and Vim! Can you clarify your terms? What does « deactivate » mean? And when you say « window » (twice), are you referring to vim split windows, tmux windows (sub-parts of tmux sessions, similar to vim tabpages), or tmux panes (sub-parts of tmux windows, similar to vim split windows)? It’s also not precisely clear what you mean by signal, but I suppose that’s because that’s the question. – D. Ben Knoble Sep 15 at 13:07
  • 1
  • github.com/vim-airline/vim-airline/issues/1807 Is exactly what I meant, thank you for the link – ndfg201 Sep 17 at 9:25
  • I tried to use 'airline_focuslost_inactive' parameter to 1 but it doesn't do anything, also tried looking on the github page and people have other problems with it – ndfg201 Sep 17 at 10:06
  • @ndfg201 you did not specify what exactly you want (or I did not understand it). But I know of no problems with the given airline parameters. So please be precise (and open an new issue if you think you have found a bug) – Christian Brabandt Sep 17 at 14:13
0

vim-tmux-focus-events will send FocusGained and FocusLost events to vim.

This will enable Vim to reload a file that has changed on disk once you switch back to the Vim window.

I don't know airline but if it uses the same events it will work there as well.

| improve this answer | |
0

I found something that work in tmux.conf :

set -g focus-events on

Nothing more

| improve this answer | |
  • Your answer was automatically flagged as low quality because it is very short. I'm declining the flag, but we encourage answers to include details that explain how they resolve the issue! You can edit to add more information, if you choose. – D. Ben Knoble Sep 17 at 12:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.