Application of FG in Linux in Vim/vi

Source: Internet
Author: User

How to use FG to quickly return to vim?

When you use VIM to modify a parameter in a file, you cannot remember the parameters for a long time. It often appears that when we just opened this file with Vim, we forgot the parameters just now. At this point we need to temporarily exit this file to find parameters in a directory. Or, you have multiple open actions to close the same file.

So how do you make this kind of operation easier and quicker?

Now if you forget the parameters in the directory/var/lib/rpm/group, the file to operate is called A.txt. In general, the procedure is: Wq or: ZZ, and then cat/var/lib/rpm/group view the parameters and copy. Then use the command vim a.txt into the a.txt and paste to the corresponding position.

One solution is to use FG.

After we use VIM a.txt found to forget parameters, then back to the command mode, press the shortcut combination of CTRL + Z, which is to put the A.txt file in the open state in the background. Once the parameters are found and the FG is entered on the command line, return to the A.txt file immediately. Multiple operations each exit file can be used Ctrl + Z, until finished, then use: Wq save exit.

There are, of course, BG orders, which are not detailed here.





Advantages: Multiple Entry Exit file operation efficiency significantly increased.


This article is from the "12270599" blog, please be sure to keep this source http://12280599.blog.51cto.com/12270599/1871620

FG in Linux is applied in Vim/vi

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.