Hi All,
I'm having the age old problem of past users code being formatted all wrong and I need to re-structure it.
Is there a function in the Zeus IDE that will convert all the tabs to spaces in the current document being edited?
Thanks for any help.
-Nate
Function to Convert Tabs Into Spaces
-
- Posts: 2
- Joined: Thu Sep 08, 2022 7:38 pm
Re: Function to Convert Tabs Into Spaces
You can do this using a Zeus macro and the macro in question is the following:
For example, if you load a file into Zeus and then use the Macros, Execute Script menu and type in detab this will run that macro and it will remove tabs from the current file without destroying the text layout.
NOTE: When run the macro will ask a question in the Zeus status bar. Answer that question by hit the Y or N key.
You can also bind the macro to a keyboard key to make it easier to run.
IMPORTANT: Naturally you should also make sure your files are under source control (or least in a backup location) before running this macro, just in case
Cheers Jussi
Code: Select all
zScript\detab.lua
NOTE: When run the macro will ask a question in the Zeus status bar. Answer that question by hit the Y or N key.
You can also bind the macro to a keyboard key to make it easier to run.
IMPORTANT: Naturally you should also make sure your files are under source control (or least in a backup location) before running this macro, just in case

Cheers Jussi
-
- Posts: 2
- Joined: Thu Sep 08, 2022 7:38 pm
Re: Function to Convert Tabs Into Spaces
Hi Jussij,
Brilliant! Thanks a bunch. I have been dealing with that issue forever.
-Nate
Brilliant! Thanks a bunch. I have been dealing with that issue forever.
-Nate