This works fine in vim 8:

autocmd CursorHoldI * stopinsert

After about 5 seconds or so of inactivity in insert mode it automatically returns to normal mode.

However, in neovim I use the deoplete autocompletion plugin, which is great... except it stops this from working. Any way to have my cake and eat it too?

  • 2
    Seems to work well for me if I type :autocmd CursorHoldI * stopinsert in the Neovim command line. Maybe there is something else in your setup? See How do I debug my vimrc file? for some guidance on how to isolate the problem. – Martin Tournoij Oct 11 '18 at 3:27

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.