one case is to open multiple files in the shell with Vim, and the other is to open multiple files in the VIM editor
open multiple files at the same timeVim File1 file2
Open the file and display the Vim-o file1 in the horizontal window file2
Open file and display Vim-o p1.sh vertically p2.sh
open a new file in VimThe original window opens the new file: Open files
Multi-window open: vs file path/filename Open file in new vertical split screen: SV file path/filename Open file in new horizontal split screen
Switch between files (one window, but multiple files are open) ctrl+6-next file: bn-Next file: bp-previous file
Multiple window switches are also turned on for files opened in multiple panes with (v) Split, this method only switches different files in the current pane. ctrl+w+ arrow key--Switch to front/bottom/up/Next pane ctrl+w+h/j/k/l--ctrl+ww--to the next pane in turn
Copying between multiple files: 1. Use visual mode in the first file, which is visual, then select the text you want to copy, execute the command "+y," or "*y" to copy the content to the Clipboard. Here can be three characters, and must be in the visual mode, and then select the code you want to copy, enter the above command, then the following in vim does not display the command you entered. 2. In another file, execute the command "+p, or" *p. Can be copied over, + refers to the meaning of the register, it seems to be the clipboard of the operating system, after copying, in other places, such as text files can be used in the CTRL + V. Here is also in the visual mode, do not need to enter a colon:, the command entered here is not visible.
Close file: Single file: Q You can turn off all: QA
This article is from the "Orangleliu Notebook" blog, reproduced please be sure to keep this source http://blog.csdn.net/orangleliu/article/details/41745975
Author Orangleliu using Attribution-NonCommercial-sharing protocol in the same way
[Vim]vim Learning Notes--Multiple files open, toggle, close