Monday, March 21, 2011

SOFTIMAGE: How to convert those annoying 4 spaces into beautiful tabs

If you recycle code from other people you might find sometimes code indented with spaces instead of tabs. At least, to us that's quite annoying, so if you want to transform all your "4 spaces" into tabs do this:

- In the "Script Editor" go to "File" - "Preferences..."
- Enable "Show Whitespace"
- Go back to the code and be sure you have visible at least a group of 4 spaces (····) and a tab (→)
- Select a set of those 4 spaces and press Ctrl + H. That'll open the "Replace" tool with the 4 spaces added to the "Find what:". Don't try to simply press space four times in there, that won't work. Don't press any of the buttons from that window yet.
- Go back to the code, copy the tab symbol (→) and return to the "Replace" window. Paste it into the "Replace with:" blank. Now you are ready to press "Replace All"
- ZUUUUUUUUUUUUUMBA!!!

No comments:

Post a Comment