Hi,
I'm trying to add some logic to SQL syntax for oracle SQL.
I wish to fold the if else statement.
if
xx;
elsif
xx;
elsif
xx;
else
xx;
end if;
I try to write the fold syntax like:
1_Id=if
1_Begin=if
1_End=end if;
1_EndBefore=elsif
2_Id=elsif
2_Begin=elsif
2_End=elsif
2_EndBefore=elsif
it only can fold those if to elsif and elsif to elsif:
I try to refer the php one.
1_EndBefore=} elseif|} else
but seem like is not working.
by the way, i notice php syntax cant fold else statement, if the else statement the same line with the close bracket.
SQL folding question
SQL folding question
- Attachments
-
- PHP else Syntax
- result2.png (3.81 KiB) Viewed 16717 times
-
- Oracle SQL
- result1.png (4.36 KiB) Viewed 16717 times
-
- PHP syntax
- result2.png (3.81 KiB) Viewed 16718 times
-
- result2.png (3.81 KiB) Viewed 16718 times
-
- result2
- result2.png (3.81 KiB) Viewed 16719 times
- Rickard Johansson
- Site Admin
- Posts: 6783
- Joined: 19 Jul 2006 14:29
Re: SQL folding question
Does this work better?
Code: Select all
1_Id=if
1_Begin=
1_End=end if
1_EndBefore=elseif|else
1_Section=
1_NoParentOfId=0
1_NotAlwaysEnded=0
1_ListItem=
2_Id=elseif
2_Begin=
2_End=end if
2_EndBefore=elseif|else
2_Section=
2_NoParentOfId=0
2_NotAlwaysEnded=0
2_ListItem=
3_Id=else
3_Begin=
3_End=end if
3_EndBefore=
3_Section=
3_NoParentOfId=0
3_NotAlwaysEnded=0
3_ListItem=
Re: SQL folding question
sorry that time I was busy and forget this case,
After I test still the same. It is correct I put under the last line in the syx file?
After I test still the same. It is correct I put under the last line in the syx file?
- Rickard Johansson
- Site Admin
- Posts: 6783
- Joined: 19 Jul 2006 14:29
Re: SQL folding question
Try this instead:
Code: Select all
[Fold]
1_Id=if
1_Begin=
1_End=end if
1_EndBefore=\in|elsif|else
1_Section=
1_NoParentOfId=0
1_NotAlwaysEnded=0
1_ListItem=
2_Id=elsif
2_Begin=
2_End=end if
2_EndBefore=\in|elsif|else
2_Section=
2_NoParentOfId=0
2_NotAlwaysEnded=0
2_ListItem=
3_Id=else
3_Begin=
3_End=end if
3_EndBefore=\in
3_Section=
3_NoParentOfId=0
3_NotAlwaysEnded=0
3_ListItem=