22

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?

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

2 Answers 2

23

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

2
  • 1
    ctrl-cdid not work for me. Try to type quit! to exit. Then, vi the file again. Jan 19, 2018 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, 2019 at 5:14
0

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

1
  • 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, 2020 at 13:34

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