For a new vim like me, the first thing that bothers me most is how I can't get out of vim. It is said: Q or: q! or: QW can quit, but how to not go out. Then I found a word:Recording.
Actually this is entered into the record key state. You enter this state when you hit Q without a colon in normal mode (command mode). After you press Q, the first letter or number you press is the shortcut key for this key macro. You can perform the key macro you just edited by pressing @ and the first letter or number you recorded.
Enter record status (recording) do not panic, press ESC, and then press Q, you can exit recording.
Ps:
: Wq Mandatory Write file and exit (save and exit Write%quite). Force write even if the file is not modified, and update the file's modification time.
: x writes the file and exits. Writes only when the file is modified and updates the file modification time, otherwise the file modification time is not updated.
This article is from the Linux Security Advisor blog, so be sure to keep this source http://chengyangyang.blog.51cto.com/9473151/1661794
What to do if Vim cannot be exited (recording)