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 Apr 29, 2016 at 13:33
  • I think OP wants to do this in IntelliJ as his colleagues are getting pissed at him
    – codaamok
    Apr 29, 2016 at 14:37
  • @the_ My computer and my colleagues both has Windows OS.
    – Gideon
    Apr 30, 2016 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, 2019 at 13:14

1 Answer 1


This works for the current file:

enter image description here


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .