Create vim git

  • I use Vim and Git together.
  • I tend to merge / switch Git branches.
  • I tend to open many vim buffers.

  • Is there a way to tell vim: when I execute this Git command (which switches branches), reload all buffers? Since I have hooks in all my vim-git interaction, letting vim know when to reboot, this is not a problem. The question is: how to make vim reload all buffers?

+3
source share
1 answer

You can try setting the parameter autoread.

:set autoread

From vim help:

When a file is found that was modified outside of Vim and it was not changed inside Vim, it automatically read it again.

+9
source

Source: https://habr.com/ru/post/1738110/


All Articles