Is there a way to exit modess vi without closing the window?

As a beginner, I started learning some new options for the vim command and when trying Modeless vi by typing the command vim -y [name of the file to edit]

, I couldn't find a way to go back to the terminal but closing it.

I know the above command starts vim

in insert mode, not allowing command mode, but my question is, is there a way to quit vi while still staying in the same terminal?

+3


source to share


2 answers


CTRL-L

brings vim back to normal mode. Then :q

exit or :q!

exit without saving.



+5


source


Vim "light mode" is a very different beast than regular Vim / Vi. Light mode gets out of this way to try and make Vim modeless, which is heresy to my knowledge.



If you want to learn some of the Vim commands, I suggest you take about 20 minutes and run vimtutor

. It will teach you some basic Vim commands. I would also suggest doing a cheat sheet if you are having a hard time memorizing commands or going through vimtutor

again. As always, the Vim documentation exists via :h

.

+1


source







All Articles