What to do if Vim cannot be exited (recording)

Source: Internet
Author: User

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)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.