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

1292Re: [jasspa] Indent question about modes

Expand Messages
  • Jon Green
    Dec 8, 2004
    • 0 Attachment
      jeremy@... wrote:
      > On Tue, 2004-12-07 at 22:24 +0000, Jon Green wrote:
      >
      >
      >>Suggest that the ';' rule is changed to:-
      >>
      >> indent .hilight.tads o "^\\s *;" -4
      >>
      >
      >
      > Great, that did the trick. I think I have only one other tricky section
      > that I am now running across.
      >
      > doEnter() {
      > descr = "This is a big long string that just wraps lines
      > with no regard for end-of-line or new-lines. All
      > are stripped by the language."
      > }
      >
      > That's what I would like a string to look like. The language (TADS) has
      > no continue character like C, nor does it begin and end strings. The end
      > result would be \r\n\t[ ] are replaced by 1 space. If I want a new line
      > in the string I have to place it with a '\n' sequence of characters.
      >
      > Here is what the above function would currently look like:
      >
      > doEnter() {
      > descr = "This is a big long string that just wraps lines
      > with no regard for end-of-line or new-lines. All
      > are stripped by the language."
      > }
      >
      > When you are defining multiple variable it get's quite confusing as one
      > could see.
      >
      > Any ideas on this one?
      >
      > Jeremy
      >
      >

      I do not have a solution for that at the moment. I agree with
      you it would be desirable if it performed the indent. I played
      around with it and the following are my set of rules, but no
      solution for the above yet.

      There are also some futher constructs such as if/else without
      the '{', '}' which are problematic. I also noted on the
      '(..)' was not returning to the correct column following a
      "say" when the line was broken over more than 1 line. This
      may be a problem with the current release I am using, I have
      not checked this with the 04/07 build.


      !if &sin "d" .fhook-tads.setup
      0 indent .hilight.tads 1 10
      indent .hilight.tads n "^\\w+\\s *:" 4
      indent .hilight.tads o "^\\s *;" -4
      indent .hilight.tads n "{" 4
      indent .hilight.tads o "}" -4
      indent .hilight.tads s "case" -4
      indent .hilight.tads n "\\[" 4
      indent .hilight.tads o "\\]" -4
      indent .hilight.tads b "(" ")"
      indent .hilight.tads e "\"" "\"" "\\"
      indent .hilight.tads e "'" "'" "\\"
      indent .hilight.tads i "//"

      !endif

      Jon.
    • Show all 4 messages in this topic