1, open multiple windows (vim editing) to open multiple Windows commands following several:
Horizontal cutting window:New+window name (file name after saving): Split+ window name, can also be abbreviated as: sp+Window name Portrait cutting window name: Vsplit+ window name, can also be abbreviated as: vsp+window name: split [filename] Open file in horizontal direction filename (duplicate current file if filename is empty): vsplit [filename] Open file filename in vertical direction (if filename is empty, duplicate current file)
Vim-o file1 file2 ... #水平打开多窗口, vim-O file1 file2 ... #垂直打开多窗口,
Vim-d file1 file2 ... #垂直打开多窗口, and compare Vimdiff file1 file2. #等同于上一句vim已经启动 Input: Open file can be opened again, and in this case the contents of the file will be displayed in Vim.
2, close multiple windows can be used: Q!, you can also use: Close, the last window cannot be closed with close. Using close only temporarily closes the window and its contents are still in the cache, using only q!, w!or X to be able to really quit. Close the window Q or close #关闭当前窗口 only #保留当前窗口, close all other Windows Qall (QA) #退出所有窗口 Wall #保存所有窗口
3, window Toggle: Ctrl+w+j/k, through the j/k can switch up or down, or: ctrl+w plus up and down keys, you can also quickly double-click CTRL +w Switch the window in turn. Commands for switching between vim and talglist windows are CTRL + W + W
4, window resizing vertical: Ctrl+w +Vertical expansion (number of rows increased): Ctrl+w-Shrink-down (number of lines): res (ize) num For example:: Res5, display rows adjusted to 5 rows: res (ize)+num adds the current window height num line: res (ize)-num reduces the current window height by num row lateral adjustment: Vertical res (ize) num Specifies that the current window is num column: Vertical res (ize)+num adds the current Window num column: Vertical res (ize)-num reduces the current window to NUM columns
5, renaming the window: F file
6VI Open Multi-file (before Vim) vi a B c:n jump to the next file, you can also directly specify the file to jump, such as: N C, you can jump directly to the C file: e# back to the file you just edited
7, file Browse: Ex Open the Directory browser, you can browse all the files in the current directory, and you can choose: Sex horizontally split the current window and open the Directory browser in a window: LS Displays the current buffer condition
8, VI and Shell switching: The shell can switch to the shell command line without shutting down VI: exit from Shell to VI
Vim Multi-window