Search code examples
sqlsql-serverphpstormphpstorm-2017.1

Type literal line feed in SQL string


I'm editing SQL in a *.sql file for SQL Server. When I hit Enter to split a SQL string in two lines:

INSERT INTO foo (bar) VALUES ('This is a line');
                      -- Cursor here: |

... PhpStorm will always close the string and insert a concatenation operator:

INSERT INTO foo (bar) VALUES ('This is' +
                              ' a line');

Is there a keyboard-shortcut to just insert a line feed?

INSERT INTO foo (bar) VALUES ('This is
   a line');

Solution

    1. Settings/Preferences
    2. Editor | General | Smart Keys
    3. Disable SQL --> Insert string concatenation on Enter option

    enter image description here