You are here: PSPad forum > English discussion forum > 3 lines before Matching Brackets

3 lines before Matching Brackets

#1 3 lines before Matching Brackets

Posted by: massimobalestra | Date: 2013-10-23 22:02 | IP: IP Logged

Hi
I often use the Matching Brackets command (Mapped to Ctrl+M in the keyboard).
example:
sub myFunction
{
.....
.....
}

If the function is short there is no problem but if the function is long and I press ctrl+M at the closing bracket (}) it matches the opening one at the top of the window. I need to do an extra step to see the function name: arrow up.
(Note: I don't like this way of writing the code, for me it would be better to put the opening bracket on the same line of the function definition, like
sub myFunction {
.....
.....
}
and this solves the problem but ... my colleagues force me to put the opening bracket on a new line. This is why I am asking you about this feature.
)

Is there a way that when it matches the opening bracket it shows also two or three lines below the matching one (maybe configurable)? This for all statements: functions, if, while, for, ...

Or it is already possible and I don't know how to do?

Thanks and thank you more for this great editor.
Massimo

Options: Reply | Quote | Up ^


#2 Re: 3 lines before Matching Brackets

Posted by: pspad | Date: 2013-10-24 05:32 | IP: IP Logged

Hello

Do you mean in case you call matching bracket (Ctrl+M) to scroll window and show about 3 lines bellow?

Options: Reply | Quote | Up ^


#3 Re: 3 lines before Matching Brackets

Posted by: massimobalestra | Date: 2013-10-24 13:34 | IP: IP Logged

No,
I mean: if I am on the ending bracket, I press ctrl+M and it shows the matching line and 3 lines above.
In this way I can see the function name (or the previous statement).
Thanks
Massimo

Options: Reply | Quote | Up ^


#4 Re: 3 lines before Matching Brackets

Posted by: pspad | Date: 2013-10-31 14:31 | IP: IP Logged

OK. I will make modification what will use program settings / Editor - search result position setting.
Plus I will modify it, that default setting will show 2 lines above and 2 lines bellow the result.

Options: Reply | Quote | Up ^


#5 Re: 3 lines before Matching Brackets

Posted by: massimobalestra | Date: 2013-10-31 15:06 | IP: IP Logged

That's wonderful!
Thank you

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR