Vim Editing multiple files

Source: Internet
Author: User

To move from one file to another
Copy and paste between different files

Edit another file
:edit foo.txt  关闭当前文件,打开指定文件,当前文件未保存会出现错误信息:e! foo.txt   缩写,强制打开指定文件错误有对应的 ID 号, :help E37  查看错误帮助
Open multiple files at the same time
vi a.ts main.lisp:files  查看打开所有的文件:wn 保存在进入下一个文件:wN 保存在进入上一个文件:2n  向后移动2个文件:args  当前处于哪个文件 a.ts [main.lisp]:args a.ts b.ts  不用退出vim你可以定义新的编辑文件:args *.lisp  打开所有lisp文件ctrl+^ 快速切换文件,但不改变你的位置`"  上次你离开该文件时光标所在的位置`.   最后一次对文件做出改动处的位置
File tags
mC 在当前位置添加标记`C  调到标记处
Save a copy of the original file
:set patchmode=.orig

Vim Editing multiple files

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.