"De-Indent" in a macro?

Help with writing and playing macros

"De-Indent" in a macro?

Postby Defiler » Tue Jan 11, 2005 12:46 pm

I've been trying to create a macro that does the following:
Select All
Shift-Tab (de-indent) repeated ten times
Strip trailing spaces
Deselect all

However, I can't find the "de-indent" action anywhere in the macro UI. Is there some other way to gain access to it, or is this a feature that just hasn't been added yet.

Thanks.
User avatar
Defiler
Newbie
 
Posts: 5
Joined: Tue Jan 11, 2005 12:00 am

Re: "De-Indent" in a macro?

Postby mrainey56 » Tue Jan 11, 2005 3:40 pm

Could you do a regular expression search that would say something like

"Find all lines in the selected text that start with any number of spaces or tabs, and replace all occurrences of those spaces or tabs with nothing"

Find RegExp "^[ \t]*"
Replace All SelectText ""


You could possibly specify the number of spaces or tabs, to move routines to the left but have them remain indented.
User avatar
mrainey56
Master
Master
 
Posts: 212
Joined: Tue Jul 27, 2004 11:00 pm
Location: Spartanburg, South Carolina

Re: "De-Indent" in a macro?

Postby Defiler » Tue Jan 11, 2005 4:55 pm

Good one. Thanks.
User avatar
Defiler
Newbie
 
Posts: 5
Joined: Tue Jan 11, 2005 12:00 am


Return to Macros