tags:

views:

18

answers:

1

"autowrite" doesn't seem to work when switching tab in vim.

Is there a way to enable it?

(I could remap 'gt' and 'gT' but I'd like to find a cleaner way).

+1  A: 

Maybe use an autocmd to run w on BufWinLeave

Benoit
Changing tab doesn't trigger BufWinLeave event. Tabs are in the same window. thx anyway.
eolo999
No, tabs are not in the same window, if you speak of Vim windowing management. Maybe, though, changing tab leaves a window active… Use TabLeave or WinLeave instead of BufWinLeave - so `:au TabLeave * w`
Benoit
thanks to your suggestion I found TabLeave too :) thx again
eolo999