Sign in to follow this  
Followers 0
randd

SciTe Question

7 posts in this topic

Just a quicky question, probably easily answered too:

When using scite how come when I first start typing:

Func Test()
   Select
      Case $test = 1

But when I hit enter after the "1" it looks like this:

Func Test()
   Select
   Case $test = 1

I thought proper (is it proper?) layout would have Case indented once more than Select.


Raoul S. Duke: Few people understand the psychology of dealing with a highway traffic cop. Your normal speeder will panic and immediately pull over to the side. This is wrong. It arouses contempt in the cop-heart. Make the bastard chase you. He will follow.

Share this post


Link to post
Share on other sites



Just a quicky question, probably easily answered too:

I thought proper (is it proper?) layout would have Case indented once more than Select.

You are right... but SciTe's AutoIndent is not capable of being configured to cope with this in a proper way.... (to my knowledge)

I always run Tidy when i am finshed writing (a section of) the script. That is programmed to cope with the Autoit3 syntax and formats it properly.


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

You are right...

Good to know. I wasn't blaming SciTe or anything, I just wasn't sure if I understood proper indentation.

Hell, I just learned about "Bulgarian Notation" from a post last week. :ph34r:


Raoul S. Duke: Few people understand the psychology of dealing with a highway traffic cop. Your normal speeder will panic and immediately pull over to the side. This is wrong. It arouses contempt in the cop-heart. Make the bastard chase you. He will follow.

Share this post


Link to post
Share on other sites

Good to know.  I wasn't blaming SciTe or anything, I just wasn't sure if I understood proper indentation.

Don't worry... We are only tweaking Scite to make it as usefull as possible.... Neil might feel hurt ...

Hell, I just learned about "Bulgarian Notation" from a post last week.  :ph34r:

:( Dunno what you mean here....

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Don't worry... We are only tweaking Scite to make it as usefull as possible....  Neil might feel hurt ...

  :ph34r: Dunno what you mean here....

:( Hungarian notation I believe is what I was looking for.

MSDN Link


Raoul S. Duke: Few people understand the psychology of dealing with a highway traffic cop. Your normal speeder will panic and immediately pull over to the side. This is wrong. It arouses contempt in the cop-heart. Make the bastard chase you. He will follow.

Share this post


Link to post
Share on other sites

JdeB, removing case/Case/CASE from block.end.$(au3) seems to keep Case statements indented properly (It still needs to be left in block.start, though).

Share this post


Link to post
Share on other sites

JdeB, removing case/Case/CASE from block.end.$(au3) seems to keep Case statements indented properly (It still needs to be left in block.start, though).

Don't think that would get closer... look at this example when i take them away from the block.end.$(au3):

if $x=$y Then
   Select
      Case whatever
        ;do whatever
         Case whatever
           ;do whatever
         EndSelect
      EndIf

currently you get:

if $x=$y Then
   Select
   Case whatever
     ;do whatever
   Case whatever
     ;do whatever
   EndSelect
EndIf

I prefer the current setup...


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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  
Followers 0