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.
Sometimes tab inserts spaces, even with soft tabs off #11
I hate to add a +1, but this doesn't seem to be going anywhere and I'm going to have to go back to Sublime Text 2 when working on a js project that uses tabs by default, and FYI it absolutely seems to relate to the use of PHP/Javadoc style block format being used, that have a leading space in them.
I'm also having this problem with the javascript editor on Ubuntu. I can't copy and paste tabs, and when I press the tab key to further indent a line that is already indented with tabs, it adds the new indent in spaces plus enough spaces to eqaul the tab amount, as if the tabs weren't there, ie with tabs set to 2 spaces a press of the tab key changes \t\t to \t\t......
@nathansobo
For me this issue has been completely resolved with something you fixed within the .90 - .99 releases so I haven't run across any file that has the issue. I wasn't sure if it was a fluke or not until your comment right now.
I'm having trouble making the issue reproduce outside my project. I can take a file where detection is incorrect, copy paste and save it somewhere else with the same name, open that file up and tab "works", while it is still broken locally.
I'd love an option to just force tab to output actual tab characters and stop guessing.
@chamons - I hear you. I get atom into all sort of strange states switching between projects that use tabs, and projects that use spaces. I would like to be able to force it rather than it guessing.
@nathansobo Sorry, the problem was I was still using 0.95. I've updated, and it works now, however there was one case where Atom used soft tabs even though I told it not to but I can't reproduce it anymore.
You can toggle soft-tab on/off on an individual editor using the editor:toggle-soft. But this setting won't persist after the editor is closed. This issue is obviously annoying for some people, so someone could open this issue on the atom repo with a description of how they expect it to behave that would be great!
The auto-detection result will persist after manually replacing all tabs with another tab type. So if you replace them all, reload the file or set the tabType setting to the type you want.
Activity
WooD1k commentedon Mar 16, 2014
Please fix it!
chamons commentedon Mar 17, 2014
See http://discuss.atom.io/t/sometimes-tab-inserts-spaces-even-with-soft-tabs-off/3976/11
tm1000 commentedon Mar 26, 2014
"Is your use case that you want to open a buffer containing soft tabs and still insert hard tabs? Or vice versa?"
Yes because in PHPDOC Block format the comments are sometimes pushed forward a little with a single space (for alignment) like so:
/*
*
Atom interprets that as "oh you have a space so everything will be spaces" which is annoying if the actual file is hard tabs.
sethburtonhall commentedon Apr 15, 2014
Please fix. This is very annoying when working with a team.
iandotkelly commentedon May 8, 2014
I hate to add a +1, but this doesn't seem to be going anywhere and I'm going to have to go back to Sublime Text 2 when working on a js project that uses tabs by default, and FYI it absolutely seems to relate to the use of PHP/Javadoc style block format being used, that have a leading space in them.
maurociancio commentedon May 11, 2014
+1
lord2800 commentedon May 12, 2014
+1 from me as well. This annoys me to no end.
sookcha commentedon May 20, 2014
+1
holzmann commentedon May 21, 2014
+1
Switched back to Sublime Text 3 because of this behavior.
mer10z commentedon May 22, 2014
I'm also having this problem with the javascript editor on Ubuntu. I can't copy and paste tabs, and when I press the tab key to further indent a line that is already indented with tabs, it adds the new indent in spaces plus enough spaces to eqaul the tab amount, as if the tabs weren't there, ie with tabs set to 2 spaces a press of the tab key changes \t\t to \t\t......
maurociancio commentedon May 22, 2014
Yes @mer10z it's very annoying. The editor works well when there are no comments in the code, as someone pointed earlier.
For example, if i have:
/**
*/
And you try to use tabs, you get spaces.
nathansobo commentedon May 27, 2014
Can someone post a file that reproduces this issue? I would have thought a previous fix that ignores comment blocks for purposes of determining the tab setting would fix this: https://github.com/atom/atom/blob/master/src/editor.coffee#L326
Are you guys having issues editing files with mixed tab styles?
probablycorey commentedon May 27, 2014
This is related to atom/atom#2045.
tm1000 commentedon May 27, 2014
@nathansobo
For me this issue has been completely resolved with something you fixed within the .90 - .99 releases so I haven't run across any file that has the issue. I wasn't sure if it was a fluke or not until your comment right now.
15 remaining items
chamons commentedon Jun 24, 2014
I'm having trouble making the issue reproduce outside my project. I can take a file where detection is incorrect, copy paste and save it somewhere else with the same name, open that file up and tab "works", while it is still broken locally.
I'd love an option to just force tab to output actual tab characters and stop guessing.
iandotkelly commentedon Jun 24, 2014
@chamons - I hear you. I get atom into all sort of strange states switching between projects that use tabs, and projects that use spaces. I would like to be able to force it rather than it guessing.
thomassross commentedon Jun 25, 2014
@nathansobo Sorry, the problem was I was still using 0.95. I've updated, and it works now, however there was one case where Atom used soft tabs even though I told it not to but I can't reproduce it anymore.
thomassross commentedon Jun 25, 2014
I
secondthird @chamons's idea to have a "force hard tabs" optionthomassross commentedon Jun 25, 2014
This issue should be moved to atom/atom now anyway because usesSoftTabs is in the Editor class.
probablycorey commentedon Jul 9, 2014
You can toggle soft-tab on/off on an individual editor using the
editor:toggle-soft. But this setting won't persist after the editor is closed. This issue is obviously annoying for some people, so someone could open this issue on the atom repo with a description of how they expect it to behave that would be great!KevinMcCoy commentedon Sep 1, 2015
Problem still here why is this close?
I'm trying to find and replace all space to tabs, and right after I replace all, atom change it right back to space....
bananavoid commentedon Oct 20, 2015
Same problem as @KevinMcCoy wrote
rinux55 commentedon Dec 1, 2015
I also still have the problem. This makes Atom not usable for me.
James-Firth commentedon Jan 12, 2016
This has also been causing a lot of issues with the team I'm on. I'm likely to switch back to Sublime now.
MattWilcox commentedon Jan 20, 2016
Why is this marked as closed? This error persists.
thomassross commentedon Jan 20, 2016
Hey guys,
A quick & easy fix is to install auto-detect-indentation
benogle commentedon Jan 25, 2016
You folks can set these settings:
core.tabTypein config.csonand
core.softTabsin config.csonYou can scope them to languages
The auto-detection result will persist after manually replacing all tabs with another tab type. So if you replace them all, reload the file or set the
tabTypesetting to the type you want.