Here, try this one:
Replacement function (viz http://openpaste.org/en/4683/ )
It addresses both issues. The file is not modified, and the brackets don't have
to be on the same line. i.e. this will work:
proc something_else {
one,
two,
three
}
{
fgdsgdfg
fdgsfdg
[color=#ff0000]|[/color]
fdgsdfgfdsg
}
Like I said, I don't know TCL. If the arguments braces are optional, change the
regexp from
var re = /\nproc\s.*(\{[^\}]*\})\s*\{/g;
to
var re = /\nproc\s.*(\{[^\}]*\})[color=#ff0000]?[/color]\s*\{/g;
This will allow this type too:
proc look_ma_no_arguments {
bla
bla
bla
}
If this isn't valid TCL, just ignore that suggestion.
--
<http://forum.pspad.com/read.php?2,44299,44356>
PSPad freeware editor http://www.pspad.com