1

This question comes from here: https://github.com/tpope/vim-fugitive/issues/1586

In a word, I'm using the two plugins: Nerdtree and vim-fugitive. What I need is when I execute :Git checkout mybr, I want to make Nerdtree be refreshed automatically.

So tpope told me that I could use autocmd User FugitiveChanged.

This is the first time that I see autocmd User. It seems that User means "never execute automatically". So I've tried to manually execute this in my vim: :doautocmd User FugitiveChanged.

However, nothing happend: no error but Nerdtree hasn't be refreshed either.

Did I do something wrong?

1 Answer 1

0

User means it is never executed by core Vim. Basically, it's a plugin who does doautocmd User X. Your business is to catch it with :augroup / :autocmd. So, yes, you did it wrong.

1
  • Could you please show me how to catch it with :augroup/:autocmd?
    – Yves
    Oct 16, 2020 at 9:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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