Linux applications: Vim multi-file editing

Source: Internet
Author: User

1. Edit another file

": Write Edit Foo.txt": Save changes to the current file and open ' Foo.txt '

": edit! Foo.txt ": Discard changes to the current file and open ' Foo.txt '

": Hide Edit Foo.txt": Temporarily do not save the current file, and open ' foo.txt '

* Note: The above method does not open two files at the same time, file list only exists after open file

2. List of files

": args": View a list of files and show the relative position of the current file in the file list

": next!": Do not save changes to the current file (change lost!), edit the next file in the file list

": Wnext": Save changes to the current file, edit the next file in the file list

":p rev!": Do not save changes to the current file (Modify lost!), edit the previous file in the Win Jiani list

": Wprev": Save changes to the current file, edit the previous file in the file list

": NNext": ' N ' is a number indicating the number of times to execute ': Next '

": Nprev": ' N ' is a number indicating the number of times the ':p Rev ' was executed

": First": Edit the file list, execute ': write ' before executing

": Last": Edit the final file in the file list, execute ': write ' before executing

": Set Autowrite": Automatically save changes to the current file when a file jump is made with the above command

": Set Noautowrite": Turn off Auto-save

": args t1.txt t2.txt t3.txt": To edit another file list, you need to save the current file first

3. Save As

": SaveAs Otherfile": Save as another file

Linux applications: Vim multi-file editing

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.