Linux--vim Editor Two

Source: Internet
Author: User

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

    1. 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

Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.