Editor "On Save" option: "Convert Tabs to Spaces" ?
Answered
How about the following editor "On Save" option: "Convert Tabs to Spaces" ?
When not everybody is using spaces instead of tabs (go talk to them ..) we need to manually convert their tabs to spaces. If IDEA was doing that automatically - that would be way more comfortable !
Please sign in to leave a comment.
It's trivial to convert them in IDEA. Summon a Global Replace via Ctrl-Shift-R, check Regular Expressions on, \t for search, 4 spaces for replace, go. Better than opening every file :)
No, I didn't mean to make a replacement in every file, only in the one being saved right now. Same way as IDEA strips trailing spaces: Settings -> IDEA Settings -> Editor -> Strip trailing spaces on Save. That's where I suggest to add a checkbox "Convert Tabs to spaces on Save" if "Global Code Style" (Settings -> IDEA Settings) has "Use tab character" unchecked, i.e if user is not using Tabs.
But I liked your idea about global replacement in one go for the whole project ..
I like this idea...
N.
Evgeny Goldin wrote:
It would be cool, if it were not out of desperate necessity. Those people are 'untalkable'...
Yeah, I understand what you mean ..
That's because there's nothing to talk about. People who use spaces for indentation are "Of The Devil" and must be purged of their sinful ways! ;)
In any case, I agree, this would be a very simple and beneficial addition to IntelliJ IDEA.
Please vote for the related request: https://youtrack.jetbrains.com/issue/IDEA-131557