I'm using Coc.vim and I've created an issue on their GitHub, but I'm not sure about whether this can be done by modifying the line I'm using:

autocmd CursorHold * silent call CocActionAsync('doHover')

as you can see I already added the slient above but it still show the error:

Then I will have to press enter since there are too many error message, which is annoying.

  • 3
    Read the help for :silent again. The answer is in the first few sentences.
    – B Layer
    Apr 14, 2021 at 3:38

1 Answer 1


From :h silent:

When [!] is added, error messages will also be skipped, and commands and mappings will not be aborted when an error is detected. [...]

The problem can be solved by these two lines:

let blacklist = ['vim', 'help']
autocmd CursorHold * if (index(blacklist, &ft) < 0 || !coc#rpc#ready())
    \ | silent! call CocActionAsync('doHover')
  • Can I have the definition popup in NeoVim on mouse hover? That code shows it on mouse click. Apr 26, 2023 at 6:12
  • @VitalyZdanevich I don't know. But I just did a fuzzy-search for the word mouse in the :h autocmd-events section of Neovim, and found no match. So this is probably not supported in both Vim&Neovim currently. (since Neovim has more events than Vim.) Apr 27, 2023 at 11:58

Your Answer

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

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