Loading ...
Sorry, an error occurred while loading the content.

Re: [jasspa] Turning off auto-indent

Expand Messages
  • Jon Green
    ... Hi Bryan, I looked at this last night running multiple schemes using a block ending of ^ s*$ (empty line). It worked for all of the given examples when
    Message 1 of 8 , Sep 15, 2009
    View Source
    • 0 Attachment
      Bryan Schofield wrote:
      > This may not be appropriate for your euphoria language mode, but I've
      > solved a complex indent/highlight problem by switching schemes in the
      > middle. For example, on the "alternate" java (hkjava.emf) I switch
      > to .indent.java-comm indent scheme when I detect the start of block
      > comment, then later switch back to .indent.java.
      >
      > Perhaps you could create an extra .indent.euphoria-const indent scheme
      > that handles the "public constant" and "public enum" case only.
      >
      > HTML mode does trickery with switching indent schemes, too.
      >
      > If memory serves, indent <scheme> "t" and indent <scheme> "x" are used.
      >
      > Cheers
      > -- bryan
      >

      Hi Bryan,

      I looked at this last night running multiple schemes using a block
      ending of "^\\s*$" (empty line). It worked for all of the given examples
      when working in-line however failed for a restyle-buffer. The problem is
      that there is not a good anchor to end the block. Using a blank line is
      also very spurious as there are too many of them.

      I know Jeremy tried anchoring on the ',', but given that this also
      appears in bracketed expressions then this is not a good choice. Also it
      fails for the construct which includes the comments.

      It is quite a nasty construct and I was thinking you almost want
      something like a indent 'c' (continue) which ends when it reaches a
      blank line. ('c' in its current form will not work either).

      Still thinking about it.

      Regards
      Jon

      >>
      >> public constant
      >> ABC = "abc",
      >> DEF = "def",
      >> XYZ = "xyz"
      >>
      >> Now, to make matters worse:
      >>
      >> public enum
      >> --** User ID
      >> USER_ID,
      >> --** User name (code used to login as)
      >> USER_NAME,
      >> --** The real name of the user
      >> USER_REALNAME
      >>
      >> if 10 then
      >> bye()
      >> end if
      >>
      >> Sort of got the , at the end of the line to indent properly, however I
    Your message has been successfully submitted and would be delivered to recipients shortly.