6

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?

  • 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 – adampski Apr 29 '16 at 14:37
  • @the_ My computer and my colleagues both has Windows OS. – Gideon Apr 30 '16 at 6: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 9 at 13:14
6

This works for the current file:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.