Tabs vs spaces


#1

I’m pretty new to atom. I use it for writing Haskell. Haskell and tab characters do not match well. I am used to not using TAB character EVER. I like it that way.
However, in Atom, every time I press some spaces after each other, they seem to be converted to TAB. It drives me mad. Is there any way I could avoid having TAB characters at all?
I have been trying to set the hard/soft tab settings, but somehow I don’t get it right.

Help is appreciated!

Cheers


#2

Did you change the tab type in language-haskell’s settings?

If not (I don’t know this for sure) I think Atom determines by itself what indentation type a file is using, and will (very helpfully ;)) convert number of spaces to a tab character. Try to use a package like tab-control to set the editor’s tab type to spaces. Maybe you’ll need to close the file and reopen it.


#3

tab-control did the trick! Thanks!


#4

I am having a similar issue where it’s treating two spaces as a tab in the editor, but it is saving them as two spaces. My problem is that if I have delete it delete both spaces instead of just one.

This seems to be a matter of having Soft Tabs checked, and setting Tab width to 1, but if Tab width is set to 1, pressing the tab keep only inserts 1 space, not 2. Is there any way to set it so the Tab key inserts 2 spaces and the editor treats them like 2 spaces, not a tab?


#5

No, there is currently no way that I know of to disable this behavior. If you want to delete only part of an indentation level, you can press Backspace and then press Space up to where you want. This is a feature of Atom to help prevent accidentally misaligning things.