Jump to content
Sign in to follow this  
sconley

SciTE - Lexer

Recommended Posts

SciTE changes the indentation of the CASE statement after a SELECT statement to be the same level as the SELECT.

While typing, the CASE statement is initially indented correctly; however, when you press ENTER, the indentation is changed back to the same level as the SELECT.

Example:

select

    case $A = $B

        MyProg()

    Case Else

        Exit(1)

EndSelect

Looks like:

Select

case $A = $B

    MyProg()

Case Else

    Exit(1)

EndSelect

The EndSelect also wants to indent at the same level as the last CASE statement.

NOTE: the Tidy program fixes everything back the way it should be.

Share this post


Link to post
Share on other sites

SciTE changes the indentation of the CASE statement after a SELECT statement to be the same level as the SELECT.

While typing, the CASE statement is initially indented correctly; however, when you press ENTER, the indentation is changed back to the same level as the SELECT.

Example:

Looks like:

The EndSelect also wants to indent at the same level as the last CASE statement.

NOTE:  the Tidy program fixes everything back the way it should be.

<{POST_SNAPBACK}>

I notice that in my version, my Cases get indented farther and farther.

Example:

Select
   Case $x - $y = 0
     ; blah
      Case $x + $y = 1
        ; blah
         Case $x -$y = -1
           ; blah
         EndSelect

As in your example, Tidy fixes it right.


Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

Those are your options: Either you get them in line with the Select keyword or they just keep getting indented like Blue_Drache shows. Currently, neither JdeB or myself have been able to figure out how to get that set right.

Share this post


Link to post
Share on other sites

Those are your options: Either you get them in line with the Select keyword or they just keep getting indented like Blue_Drache shows.  Currently, neither JdeB or myself have been able to figure out how to get that set right.

<{POST_SNAPBACK}>

Correct... and just for the record... this is not a Lexer function but configured with the below commands.. i am open for suggestions when somebody can figure it out....

block.start.$(file.patterns.au3)=5 case if do for func else elseif while select \

                    Case If Do For Func Else ElseIf While Select \

                    CASE IF DO FOR FUNC ELSE ELSEIF WHILE SELECT

block.end.$(file.patterns.au3)=5 case else endif elseif endfunc endselect next until wend \

      Case Else EndIf ElseIf EndFunc EndSelect Next Until Wend WEnd\

                  CASE ELSE ENDIF ELSEIF ENDFUNC ENDSELECT NEXT UNTIL WEND


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Those are your options: Either you get them in line with the Select keyword or they just keep getting indented like Blue_Drache shows.  Currently, neither JdeB or myself have been able to figure out how to get that set right.

<{POST_SNAPBACK}>

Well, it doesn't really bother me that much. I was just posting my example for the record. :lmao:

I just ignore it and run tidy after finishing my select/case/endselect structure.

@JdeB

Thank you soooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo much for that tidy.exe

Edited by Blue_Drache

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

The latest version of Scite4Autoit3 does not have this problem. The previous versiom had Case missing from the block.end.*.au3. This was corrected. Anyone suffering from Case Select functions, continually indenting, has not updated their installation, to the latest, released a month ago.

Latest version Feb 8th:

block.start.*.au3=5 case if do for func else elseif while select \
                    Case If Do For Func Else ElseIf While Select \
                    CASE IF DO FOR FUNC ELSE ELSEIF WHILE SELECT
block.end.*.au3=5 case else endif elseif endfunc endselect next until wend \
                  Case Else EndIf ElseIf EndFunc EndSelect Next Until Wend WEnd\
                  CASE ELSE ENDIF ELSEIF ENDFUNC ENDSELECT NEXT UNTIL WEND

Previous version (with missing Case):

block.start.*.au3=5 case if do for func else elseif while select \
                    Case If Do For Func Else ElseIf While Select \
                    CASE IF DO FOR FUNC ELSE ELSEIF WHILE SELECT
block.end.*.au3=5 endcase else endif elseif endfunc endselect next until wend \
                   EndCase Else EndIf ElseIf EndFunc EndSelect Next Until Wend WEnd\
                   ENDCASE ELSE ENDIF ELSEIF ENDFUNC ENDSELECT NEXT UNTIL WEND

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...