12

When my cursor is after an open quote in a SQL statement in an IntelliJ database console and I press Enter, it closes the quote on the current line and adds a concatenation symbol with an open quote on the newline.

I disabled formatting the SQL code style settings but that didn't fix it for me.

UPDATE blah SET blah2 = 'something<pressed enter>' ||
  '<argh!>...';

Is there a way to disable this autoformatting?

4

2 回答 2

13

请求已在2017.1版本中得到解决,因此专门为 SQL 添加了 在 Enter 设置时插入字符串连接:在 Enter 上插入字符串连接

于 2017-03-18T01:45:56.013 回答
1

这可以从 IntelliJ 13 开始存档。您只需将代码包装为

// @formatter:off

your code goes here

// @formatter:on 

由于 IntelliJ Idea 15-16(如果我错了,请原谅),您还可以通过Preferences > Editor > Code Style选项进行永久设置

希望能帮助到你

于 2017-03-17T17:52:03.950 回答