1

I am writing a comment plugin that supports commenting in visual line mode. I tried using vim.cmd "stopinsert" for returning back to normal mode, but it doesn't work. How can I return back to normal mode?

1

I find out that I can do that with vim.api.nvim_input("<esc>"), but I am not sure if there is a better alternative

1
  • Beware that nvim_input is non-blocking Dec 19 '21 at 3:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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