[Convert] vim-tab to Space

Source: Internet
Author: User
In vim, the tab is automatically converted to a space.
In vim, you sometimes need to convert tabs into spaces. Use the RET command (replace tab ).
[Range] RET [AB]! [New-tabstop]

For example, the tab line from the first line to the end of the file is converted to space, and each tab is replaced by four spaces.
: Set expandtab
: % RET! 4
If 4 is not specified, the current tab width is replaced with space.

Other related commands:
: Set tabstop = 4 set the tab width to 4 characters
: Set shiftwidth = 4 set Automatic indent to 4 characters
: Set expandtab replaces the tab input with Space
: Set noexpandtab do not use space to replace the input of the tab Original: http://hi.baidu.com/ubrowlwchlbjowr/item/cb4b3e98f379a7f22816476e
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.