Function to Convert Tabs Into Spaces

Get help with the installation and running of the Zeus IDE. Please do not post bug reports or feature requests here. When in doubt post your question here.
Post Reply
NaterSkater
Posts: 2
Joined: Thu Sep 08, 2022 7:38 pm

Function to Convert Tabs Into Spaces

Post by NaterSkater »

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
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Re: Function to Convert Tabs Into Spaces

Post by jussij »

You can do this using a Zeus macro and the macro in question is the following:

Code: Select all

zScript\detab.lua
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
NaterSkater
Posts: 2
Joined: Thu Sep 08, 2022 7:38 pm

Re: Function to Convert Tabs Into Spaces

Post by NaterSkater »

Hi Jussij,

Brilliant! Thanks a bunch. I have been dealing with that issue forever.

-Nate
Post Reply