To
open multiple files: 1.vim has not yet started:
Enter in the terminal
Vim file1 file2 ... filen can open all the files you want to open
2.vim has started
Input
: Open File
You can open a file again, and Vim will display the contents of the file.
Display multiple files at the same time: : Split
: Vsplit
Displays the current file name: F
Undo: U Anti-undo: Ctrl + T cut: D full row cut: DD
To switch between files: 1. Switch between files
ctrl+6-Next file
: bn-Next file
: bp-Previous file
For files opened in multiple panes with (v) Split, this method will only switch different files in the current pane.
2. The way to switch between panes
ctrl+w+ Direction Key--switch to front/bottom/top/rear one pane
ctrl+w+h/j/k/l--ditto
ctrl+ww--switch back to the next pane in turn cursor Jump: CTRL + O CTRL + I
Line jumps: Beginning of line: 0 End: $
Jump to the beginning of the line: GG
Search content:/. One forward, one backwards.
Format code: GG=G
Full-Text Search replacement: 0, $s/str1/str2/g
Code comments: 1 Ctrl + V 2 Press up and DOWN arrow 3 by capital Letter I 4 input//5 Press ESC
Source: http://www.cnblogs.com/hnrainll/archive/2011/04/29/2032662.html
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