Various tips for VIM

Source: Internet
Author: User
CentOS system, modify the Vim profile/ETC/VIMRC add the following: 1)  open VIMRC, add the following statement to make syntax highlighting: syntax on2)  If the syntax is still not highlighted, then in the/etc directory Add the following statement to the profile file: Export Term=xterm-color3) Resolve the problem of the key and backspace key invalidation (in non-compatible mode) set Nocompatibleset backspace=24, setting the Windows-style + + Auto Indent (add the following set statement to VIMRC) 1) Set (soft) tab width to 4:set tabstop=4set softtabstop=42) set indent to 4set shiftwidth=43) Set auto indent: The indent value for each line is equal to the previous line, and the  noautoindent setting  : Set Autoindent4) sets the  automatic indentation using the C + +  language: Set CINDENT5) Language specific indentation: Set Cinoptions={0,1s,t0,n-2,p2s, (03S,=.5S,>1S,=1S,:1S6) if you want to display the line number of text on the left, you can use the following statement: Set NU7) Finally, if there is no following statement, Just add it: if &term== "xterm" set t_co=8             

Various tips for VIM

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.