688RE: [jasspa] Digest Number 164
- Oct 11, 2002I Just wanted to share a macro that I wrote. I work with a lot of enums in C/C++ and I hate when my fellow developers don't align all the equal signs("=") in the enumeration. So I wrote this little macro to do it for me. To use it, adjust the first = to the proper column and run the macro. It stops if it attempts to delete characters other then spaces. Please let me know what you think and any way to improve it. Like possibly aligning tables or more then one character on each line...
set-variable .TheChar @wc
set-variable .TheColumn $window-acol
!if &or &xsequal @wl "^[ \t]*$" &xsequal @wl "^[ \t]*//.*$"
!if ¬ &xsequal @wl &cat &cat ".*" .TheChar ".*"
!while ¬ &sin @wc .TheChar
!if &equal .TheColumn $window-acol
!if &less $window-acol .TheColumn
!while &less $window-acol .TheColumn
!if &great $window-acol .TheColumn
!while &great $window-acol .TheColumn
!if ¬ &seq @wc " "
- Next post in topic >>