You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Tab type auto-detection fails when creating a new file #263
Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages
Description
Tab type auto-detection fails when creating a new .py file. Furthermore, the editor always inserts soft tabs regardless of the Soft Tabs setting (specified in Settings → Editor). It only detects hard tabs correctly if I manually paste a hard tab character and then reopen the file.
Steps to Reproduce
Make sure Tab Type is set to auto and Soft Tabs is off (Settings → Editor) and the package-specific settings for language-python are all default
First scenario:
Create a new Python source code file
Press tab to indent the line
Second scenario:
2. Create a new Python source code file
3. Paste Python code that uses hard tabs
4. Press tab to indent a line
Expected behavior: In the first scenario, I expect the editor to insert a hard tab because there was no other indentation in the document and Soft Tabs is disabled. In the second scenario, I expect the editor to automatically detect that the code uses hard tabs and therefore insert a hard tab when indenting a new line.
Actual behavior: In both scenarios, the editor inserts a soft tab (as if Tab Type was set to soft).
I came to realize the second scenario is probably a bug on Atom’s side because it applies to other languages as well—only that they respect my Soft Tabs setting.
@Lilalas This package sets language specific settings, including softTabs to true. To change this, you can open language-python in settings and change the tab type there.
Activity
Lilalas commentedon Jul 9, 2018
I came to realize the second scenario is probably a bug on Atom’s side because it applies to other languages as well—only that they respect my
Soft Tabssetting.Aerijo commentedon Aug 20, 2018
@Lilalas This package sets language specific settings, including
softTabstotrue. To change this, you can openlanguage-pythonin settings and change the tab type there.