How to replace all tab characters in classes by sequences of white-spaces?
Project has 10K+ classes.
Have Community edition IntelliJ, how do I automate this process?
How to replace all tab characters in classes by sequences of white-spaces?
Project has 10K+ classes.
Have Community edition IntelliJ, how do I automate this process?
In IntelliJ you can do a find and replace across the entire project by doing ctrl-shift-r, or by going to Edit->Find->Replace In Path, make sure the 'Regular expression' box is ticked, then in the 'Text to find' box enter \\t
and the 'replace with' box enter four spaces or whatever you want to replace the tabs with
You could do some magic with find and perl:
find . -name "*.java" -exec perl -i.bak -pe 's/\t/ /g' "{}" \;
This will find all files named something.java within the current directory and its subdirs, then call perl to replace all tabs with four spaces, and create a backup of the file before performing this substitution with the extension.bak
You can replace tabs with spaces with Notepad++:
Navigate in the menu bar to "Search→ Find in Files..." and fill the formular like below.