The way and Operation of opening multiple Files by vim
I. vim start and open files
1.1 without any parameters, start vim, display the version number, and other help information
# vim
1.2 the specified number of lines and multiple files can be opened in the option.
# vim [option] file....
# vim + file Open file to the cursor to the last line
# vim + 10 file Open the file file to the cursor to 10 lines
# vim + / from file Open the file and navigate to the location where from first appeared
# vim-o file1.file2 opens the file horizontal split window
# vim-O file1.file2 opens the file vertical split window
two。 Open multiple files in the following format:
# vim file*.txt or # vim file file2 file3
Check the file that is currently being programmed, under the colon command line
Args command, similar to: file [file2], with the file currently edited in square brackets
: next to the next file can be abbreviated: n
: prev goes to the previous file, the abbreviation is invalid
: last goes to the last file
: first goes to the first file
: W save disk; can be used with next,prev, such as:: wn;: wprev; but not with last,first
: 2next; you can add a command count before next,prev. The current command is to skip 2 files.
Set autowrite auto save command
Set noautowrite does not automatically save disk
Args file file2 file3 redefines the list of open files
CTRL- ^ can quickly switch between two files, which is more important.
`"when you jump to another file for File2 editing, when you return to the current file F2, jump to the cursor location that leaves that file F2."
`. When you jump to another file for File2 editing, when you go back to the current file F2, you jump to the modified location that left that file F2.