8

Can I convert spaces to tabs in IntelliJ? I'm editing my source code in Sublime Text while my workmates uses IntelliJ. IntelliJ always change my tabs into spaces. I've changed my settings here:

enter image description here

But it only affects new files. How can I include the old files in the process?

CharlieRB
  • 22,754
Gideon
  • 437
  • what OS are you on? if you're on a *nix system you could use tr – the_velour_fog Apr 29 '16 at 13:33
  • I think OP wants to do this in IntelliJ as his colleagues are getting pissed at him – codaamok Apr 29 '16 at 14:37
  • @the_ My computer and my colleagues both has Windows OS. – Gideon Apr 30 '16 at 06:17
  • reformat code will ensure all files reformatted have the correct tabs/spaces settings BUT it will also do all the other formatting, so may be ok, but you'd have to decide.

    Otherwise, it looks like its file-by-file.

    – mikezx6r Jul 09 '19 at 13:14

1 Answers1

7

This works for the current file:

enter image description here