Jump to content

Just a readability note...

Recommended Posts

You can have variables containing exclusively whitespace. While this is generally a bad idea, it can be used for better readability in REPLACE_TEXTUALLY lines:


BEGIN ~asd~
<<<<<<<< asd
Something				 Else()

INCLUDE ~bg2fixpack/lib/extra_regexp_vars.tph~

COPY ~asd~ ~foo~
~ ~[%tab% %wnl%%lnl%%mnl%]+~
 SPRINT ~ ~ ~[%tab% ]+~

%Something% %Else()~ ~Something()


will work as intended if all the file is encoded with the same newline notation, but perhaps is more readable than putting hundreds of [%tab% %wnl%%lnl%%mnl%]+ in the code :)

you may have to define the %space*m newline space*n% variable multiple times with a different number of spaces before and after the newline (before the NL just in case somebody puts a trailing space for error), to account for different indentation level, but that shouldn't be a problem.

Link to comment


This topic is now archived and is closed to further replies.

  • Create New...