JunoLab / atom-ink

IDE toolkit for Atom
MIT License
229 stars 40 forks source link

Inserting tabs not possible anymore #180

Closed fbruetting closed 5 years ago

fbruetting commented 5 years ago

Since a few days, when I press the tab key, I get stupid spaces instead of tabs.

I strongly believe, the latest upgrade of ink did cause this, as as far as I can recall, I haven’t upgraded any other packages.

In Atom, I unchecked “soft tabs”, “tab type” is hard, “tab length” is 4. My .editorconfig is:

indent_style                = tab
tab_width                   = 4

Can I downgrade ink?

// Ok, sometimes I get real tabs, sometimes not. This is a little bit strange and I get spaces especially in block comments (#= … =#).

pfitzseb commented 5 years ago

Do you have indent-detective active (it's pre-installed with Juno)? If so, try checking the lower right corner of the status bar, there should be an indicator there.

If that detects the current file's setting erroneously please open an issue in the relevant repo and provide the file that reproduces the buggy behaviour if you can. A short term fix might be to just disable indent-detective though.

Edit: Also check the julia specific indent settings in the language-julia package.

fbruetting commented 5 years ago

Ah! That’s what caused this effect – thanks for the hint!

The file is corporate property, so I sadly can’t give it to you. That detective also doesn’t seem to support hard tabs at all. I don’t know if Atom respects .editorconfig files by default, but if it does, it’s bad to overwrite that – and if Atom doesn’t respect this file, I think it would be nice if the detective could read that, in order for not having to guess in the first place! ;)

https://editorconfig.org/

I use hard tabs which are four-spaces-wide everywhere, so I just move on with deactivating that detective.

pfitzseb commented 5 years ago

Hm, from my limited testing indent-detective seems to work with hard tabs...

AFAIK Atom doesn't support .editorconfigs by default, but you can install https://atom.io/packages/editorconfig. Not sure what the interaction with indent-detective is though...