在SQL字符串中键入文字换行符

时间:2017-04-17 08:46:38

标签: sql sql-server phpstorm phpstorm-2017.1

我在SQL Server的* .sql文件中编辑SQL。当我按 Enter 将SQL字符串分成两行时:

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

... PhpStorm将始终关闭字符串并插入连接运算符:

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

是否只有插入换行符的键盘快捷键?

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

1 个答案:

答案 0 :(得分:2)

  1. Settings/Preferences
  2. Editor | General | Smart Keys
  3. 禁用SQL --> Insert string concatenation on Enter选项
  4. enter image description here