I got stuck in ex input mode by typing :i. Now I cannot use any commands. All there is just a string of text. Pressing escape does not get me out of it, typing :visual does not get me out of it, and typing visual does not get me out of it. How do I get out of it?

  • 4
    Enter a line containing a simple dot . or hit C-c. May 9 '16 at 18:20
  • 2
    Have you tried ctrl-c? Edit: user9444929 was a second faster :-)
    – statox
    May 9 '16 at 18:20

:insert will keep asking for lines until you type a line only containing .. For more help see :h :i.

  • 1
    ctrl-cdid not work for me. Try to type quit! to exit. Then, vi the file again. Jan 19 '18 at 14:42
  • :insert and . Those two lines above helped me to quit that Ex mode. After pressing Enter, it went back to the normal mode where I am able to use '':''. From that mode I just closed and launched again. Thank you Peter Rincker
    – honorux
    May 16 '19 at 5:14

To leave the input mode and get back to terminal press esc :qa!

  • 3
    Welcome to Vi and Vim! Unfortunately the answer you’ve posted doesn’t answer the asked question, but thanks for spreading the knowledge!
    – D. Ben Knoble
    Jan 30 '20 at 13:34

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.