daa84 / neovim-gtk

gtk ui for neovim
GNU General Public License v3.0
717 stars 56 forks source link

Feature suggestion: Automatic checktime when window is focussed #18

Closed wezm closed 6 years ago

wezm commented 6 years ago

Many years ago when I used MacVim, one of the benefits over console vim was that it automatically refreshed files when it regained focus. This can be great if you switch git branches or something then switch back. Instead of needing to remember to :checkt it does it for you.

kirillrdy commented 6 years ago

good idea, gvim does the same thing

daa84 commented 6 years ago

Sounds good. Solution maybe to add call of checktime on focus enter or implement autocommands FocusGained/FocusLost. So user can add something like this autocmd FocusGained * checktime to config.

daa84 commented 6 years ago

Adding something like this to init.vim fix this problem autocmd BufEnter,FocusGained * checktime