16. Use Vim to edit multiple files
Usage:
Vim FILE1 FILE2 FILE3
Switch between files:
Last-line mode:: Next switches to the next file
: prev Switch to previous file
: Last switch to final file
: first to switch to file one
Exit
: QA All exits
17, split screen display a file.
Ctrl+w, S: Horizontal splitter window
Ctrl+w, V: Vertical splitter window
Toggle the cursor between windows:
CTRL+W arrow (arrow keys)
: QA Closes all windows
18. Edit multiple files in a window
Vim-o: Horizontal Split display
Vim-o: Vertical Split display
19. Save some of the contents of the current file as a file
Use the W command in the last row mode
: W
: Add1,add2w/path/to/somewhere
20. Populate the contents of another file in the current file
: R/path/somefile
21. Interacting with the shell
In the last row mode
:! Command
22. Advanced Topics
1. Display or suppress line numbers
: Set number or: Set Nu
: Set Nonu
2. Display ignore or case sensitive
: Set ignorecase or: Set IG
: Set Noic
3. Set Auto Indent
: Set Autoindent
: Set AI
: Set Noai
4. Check the found text highlighting or canceling
: Set Hlsearch
: Set Nohlsaerch
5. Syntax highlighting
: Syntax on
: Syntax off
23. Configuration Files
/ETC/VIMRC is valid for all users
~/.VIMRC only valid for current user
This article is from the "10858195" blog, please be sure to keep this source http://10868195.blog.51cto.com/10858195/1977039
Linux--vim Editor Two