vim - open multiple files, display multiple files at the same time, switch between files

Open multiple files:
1. When vim has not been started:
enter
vim file1 file2 ... filen in the terminal to open all the files you want to open
2. Vim has been started
Enter
: open file
to open another file, and At this point vim will display the contents of the file file.

Display multiple files at the same time:
:split
:vsplit

Switch between files:
1. Switch between files
Ctrl+6—next file
: bn —next file :
bp—previous file
open files in the current pane, this method will only switch between different files in the current pane.
2. The method of switching between panes
Ctrl+w+direction keys - switch to the previous/down/up/back pane
Ctrl+w+h/j/k/l - same as above
Ctrl+ww - backward in turn switch to the next pane

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326774048&siteId=291194637