2

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 Answer 1

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

2
  • Beware that nvim_input is non-blocking Dec 19, 2021 at 3:11
  • Have you found a better solution yet?
    – Myzel394
    Nov 1 at 15: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.