Any way to turn off "smart" handling of multi-line strings?

The behavior is driving me nuts. It may be just be how I typically use multi-line strings, but I have to reformat each time I add a new line.

Comment actions Permalink

Settings -> Code Style -> Scala -> Multiline Strings.
This page contains many settings for multil-line strings typing.
If it's not enough for your multi-line strings style, please tell us, and we will try to implement such way too.

Best regards,
Alexander Podkhalyuzin.

Comment actions Permalink

I looked there but missed the tab. Sorry.

Right now the main thing I use multi-line strings for is for esper's dsl, eg:

  epl {"""@Name("#ruleName: event C(_) -> C(P) while #{event.eventTypeName}(true).lastevent => Update CycleParts")
      #event.streamName, prevCycle, currentCycle, state
      pattern #[ every prevCycle=CurrentCycle
                 -> (currentCycle=CurrentCycle(isProducing=true) and not CurrentCycle(isProducing=false))
              #] unidirectional,
      and (PartsUpdatingUtil.isNewCycle(prevCycle, currentCycle) or
           PartsUpdatingUtil.isSameCycleWithNoParts(prevCycle, currentCycle))
      and state.value = true

For this None seems to work best. But I can imagine I would like the other settings for more typical cases.
So maybe it would be nice to have some kind of "shift-Return" that can be used to get the None behavior
on demand.

I also use the scala enhanced-strings project a lot (ie, the #varname). I expect I will  replace this in 2.10
with the built in string enhancements. Will there be direct support for substituions in s"" ?
Comment actions Permalink

Yep, string interpolation is already supported. Autocomplete, rename etc work for identifiers in interpolated strings.



Please sign in to leave a comment.