1

In sql file no matter I do when I hit ENTER key I always get ' || ' inserted into the file. How to stop IDE doing it?

Yoda
  • 17,363
  • 67
  • 204
  • 344
  • "No matter what", or only when the cursor is within a WHERE clause? – Charles Duffy Apr 03 '20 at 13:17
  • @CharlesDuffy No, when cursor is inside of `insert into table (key, text) values (HERE)` I need it to stop. – Yoda Apr 03 '20 at 13:25
  • If it's doing that, it thinks you're inside a string, so it's introducing a string continuation. Frankly, that's *correct* behavior, because adding a literal newline is illegal syntax if you're inside a string literal. Check that you don't have stray or unbalanced quotes somewhere in your file. – Charles Duffy Apr 03 '20 at 13:54
  • 2
    You may disable "Insert string concatenation on enter" option in "Settings/Preferences | Editor | General | Smart Keys | SQL" – y.bedrov Apr 03 '20 at 14:50
  • Its IDEA' settings. Check below: https://stackoverflow.com/questions/42864012/how-do-i-stop-sql-splitting-string-literals-when-i-press-enter-in-datagrip-or-in/42869558#42869558 – Ilya Davkaev Oct 20 '20 at 03:13

0 Answers0