Change spaces to TABs
Ozzie
Posts: 50 Bronze 5
I inheirited lots of code indented with spaces. Is there a way to replaces spaces with a tab? Also to remove doubles spaces, space then a tab, etc - combinations of characters - a regex kind of solution.
I had been replacing every 2 spaces with 1 space, but that leaves me with code starting with a space - any way to remove all leading spaces?
Thanks,
Doug
I had been replacing every 2 spaces with 1 space, but that leaves me with code starting with a space - any way to remove all leading spaces?
Thanks,
Doug
Comments
However this does depend on the current layout and the options you have set.
It is probably worth trying and seeing what happens as you can always undo and changes in the script window.
Regards
Dan
Red Gate Software Ltd
When I run the Lay Out SQL option it uses spaces, not tabs - is there a way to make it use tabs?
Also - it indents the begins with 4 spaces/tab - I don't like my BEGIN/END indented under my IFs - is there a way to turn this off?
A specific answer would be appeciated, not a generalized recommendation - an order for Richard hinges on this capability (the tab vs space issue).
TIA,
Doug
The indentation of the BEGIN and END can be switched off by using one of the Schema statement options. Deselect Indent contents in the Content placement option.
We are always looking at the options and how thwy are used. Unfortunatly we have to balance keeping the number of options to a usable amount against their practicallity. In developing the application there were requests for many nore options than are a avalable but to have put them all in would have made the product unusable.
However we are reevaluating each time we work on a release and the use of tabs may be included next time.
Regadrs
Dan
Red Gate Software Ltd