Vim compiler set environment and line breaks, auto indent, etc.

Source: Internet
Author: User

The VIM compiler provides commands that can set their environment properties.



use under the terminalVimwhen editing, by default, the editing interface is not displayedLine number, syntax high brightness display, smart indentand other functions. In order to better inVim, you need to manually set up a profile:VIMRC.



First step into Vim's configuration file: Cd/etc/vim's configuration file in the ETC directory


The second step is to open the Vim configuration file Vimrc:vim VIMRC


The third step is to modify the configuration file: The method is simple, just add the appropriate command below.

If &term== "Xterm"
Set T_co=8

Set T_SB=^[[4%DM
Set T_SF=^[[3%DM

Let's take a look at some of the most common commands


Line number setting command

Set Nu (Nonu)

The command displays the line number (or the line number is not displayed)


Show Settings command

Set Hlsearch (Nohlsearch)

This command sets the search string anti-white display (or not anti-white display)


Grammar indent command

Set Autoindent

This command shows the automatic indentation of program syntax


Syntax highlighting command

Synax on (off)

This command implements the program syntax highlighting (or not highlighting)


This is a few more commonly used.


Note: Be aware that all commands need to be entered in the last line mode

Vim compiler set environment and line breaks, auto indent, etc.

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.