Is it possible to turn off the default javascript multi-line behaviour?

I'm using a lot of multi-line strings in javascript, for templating purposes.

For instance

var foo = "\
    <div id="{{id}}" {{attrs}} >\
            <li><a href="#"><strong>Toronto</strong>2004</a></li>\

The \ character is used to make the multi-line string valid JavaScript.  What's rather annoying is that each time I try to insert a new line PhpStorm automatically inserts a closing " and a + and a " on the next line, thus breaking my carefully-laid out code.   It's assuming that I want to do multi line strings by concatenating strings for each line.

Is it possible to disable this? I couldn't find an option anywhere.

Ben Clayton

Is anyone at jetbrains or the communitity able to help me here?


I would expect that automatic concatenation insertion should not be inserted at all, please file YouTrack ticket for that


Please sign in to leave a comment.