You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When working with PL/SQL, There is a BEGIN - END block, and it can have an EXCEPTION section in the middle (optional). So far, this is possible with \<begin\>:\<exception\>:\<end\>.
The problem arises when I try to implement the DECLARE section (declaration section for a begin-end block). It's optional, so the complete scenario goes like "[DECLARE] - BEGIN - [EXCEPTION] - END".
I imagine it would look like this: \<declare\>:\<begin\>:^\s*\<exception\>:\<end\> (^\s* to avoid matching the declaration of an exception).
This works perfectly for the complete scenario, but as soon as the cursor leaves declare, it is ignored (% cycles through begin, exception and end only).
I've tried both settings at once, one before the other, and the other way around, but none worked for me.
I'd like to know if there's a way to set up an optional first element for matching (as of current version), or if it's possible to implement it somehow.
I saw a similar issue regarding an optional last element, and I understand that there are possible limitations for this.
When working with PL/SQL, There is a
BEGIN
-END
block, and it can have anEXCEPTION
section in the middle (optional). So far, this is possible with\<begin\>:\<exception\>:\<end\>
.The problem arises when I try to implement the
DECLARE
section (declaration section for a begin-end block). It's optional, so the complete scenario goes like "[DECLARE] - BEGIN - [EXCEPTION] - END".I imagine it would look like this:
\<declare\>:\<begin\>:^\s*\<exception\>:\<end\>
(^\s*
to avoid matching the declaration of an exception).This works perfectly for the complete scenario, but as soon as the cursor leaves
declare
, it is ignored (%
cycles through begin, exception and end only).I've tried both settings at once, one before the other, and the other way around, but none worked for me.
I'd like to know if there's a way to set up an optional first element for matching (as of current version), or if it's possible to implement it somehow.
I saw a similar issue regarding an optional last element, and I understand that there are possible limitations for this.
Here's how I've tried
Scenario 1:
begin
beforedeclare
Cursor at

DECLARE
, all matches are highlightedType

%
to go to next match.DECLARE
is no longer highlighted, and%
no longer cycles through it.Scenario 2:
declare
beforebegin
The complete text works fine

With the

DECLARE
section commented/omited, the match no longer worksThe text was updated successfully, but these errors were encountered: