Set the VIM profile so that tab is 4 spaces

Source: Internet
Author: User

  

Set shiftwidth=4 "This amount is the indentation depth per line, generally set to the same width as tabstop" set tabstop=4 "sets the width of the tab display, Python is recommended to set to 4" "just said tab and space is different, Although you can use the tab in your own code "" But if you share your code with a friend who uses spaces, it will cause a lot of trouble "" then set the following line to automatically expand the tab to the space "set Expandtab" If you just want to expand the tab into a space in a Python file, change to the following phrase "Autocmd FileType python set Expandtab" Some of the above configurations already allow you to avoid compiling problems with errors "" However, there are some configuration is to suggest students to add the "set smartindent" Smart indent "set Cindent" C language Style indentation "set autoindent" Auto Indent "

Set the VIM profile so that tab is 4 spaces

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.