Sublime text 3 Setting use space to replace TAB key

Source: Internet
Author: User
Tags sublime text

tabs, and love and hate. Because this thing can replace a space with only one character.

However, some development tools instead of the tab to replace the space, so that I modified the code of other people's tools after editing, there will be a lot of inconsistent issues. Cause code clutter to be difficult to read. At this point, the best way is to unify the tabs.

More important is that if you are writing Python code, then there will be a lot of problems, Python is strict indentation and alignment to identify the code snippet, but mixed use of space and TAB key, there will be many problems, reported a variety of formatting errors, in order to prevent this confusion, in most cases, A good coder will replace the TAB key with a space.

In general, we will use a tab with 4 spaces Instead, some people are accustomed to 2 spaces. But the actual 2 space space is too small, not easy to read. 4 a little better. So no nonsense, look at Sublime text 2 How to set the tab bar. method One, modify the user profile to open the default profile Preference-Settings-user (Preferences/settings-users), add or modify the following

	The number of spaces a tab is considered equal
	to ' tab_size ': 4,
	//Set to True to insert spaces when tab is PR essed
	"Translate_tabs_to_spaces": true,
Modifying Settings-default can also do the following, but the default profile is best not to change the number of spaces you want to tab_size, 2, 4, 8. And the following translate_tabs_to_spaces whether the Conversion tab is a space, this must be true OH
Method Two, set the shortcut key mappings

If you want to change into a few spaces, just tap into a few 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.