VI Editor keyword highlighting settings, line number settings

Source: Internet
Author: User

VI Editor is very powerful, learn, share with you

Share a little today

VI Editor keyword highlighting settings, line number settings

1. Open the terminal and enter the following command

Cd/usr/share/vim

sudo vim VIMRC

2. Need to get root password, not visible, if the input error will appear error prompt

Password:

Sorry, try again.

Password:

Sorry, try again.

Password:

Sorry, try again.

Sudo:3 Incorrect password attempts


3. After entering the configuration file, configure it according to your needs

1 "Configuration file for Vim

2 Set modelines=0 "cve-2007-2438

3

4 "Normally we use vim-extensions. If you want

5 "Remove Change the following statements

6 Set nocompatible "Use Vim defaults Instea

7 Set backspace=2 "more powerful Backspaci

8 Set ai"Auto indenting

9 Set history=100"Keep-lines of history

Ten set ruler"show the cursor position

syntax on"syntax highlighting

Set Hlsearch

Set number

14

15

4. Double quotes are followed by comments, which can be added without

5. Save File Shift+zz exit

6. Run sudo vim vimrc again

Ok



VI Editor keyword highlighting settings, line number settings

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.