how can i get out of vi editor when esc won't work?
There are few more commands for that apart from the one you are using
- Shift+zz to save (if modified )and exit
- :cq quit without writing
EDIT : I found some more commands that I just learned .
There are many ways to exit from vi editors, and you can use some of these commands to exit from other editors
- Press F2, this will drop you in Insert Mode, now press: q and hit enter
- another way is to press Ctrl + c or ctrl + z command to exit the vi editor forcefully.
- press ZZ (shift+z+z). it will save and exit.
- Ctrl + [ will also work like escape key.
the 3rd , and 6th command may or may not work on every system, as it depends on terminal's setting and system itself.
or you can do map certain keys to behave like escape, please refer this post , that will save you some keystrokes.