Is there a way to get datagrip to ignore newlines?


When I paste a query into a database console window, oftentimes there will be a trailing newline. The problem is that the presence of this newline makes the Execute button and its hotkey do nothing because there's nothing on the line the caret is on. I have to hit ctrl+A and then execute to get it to notice the preceding line and run the sql, which is cumbersome. Is there any way to make it ignore trailing whitespace, or make it accept multiline input so that this isn't a problem? Thanks


IntelliJ IDEA 2020.2.1 (Ultimate Edition)
Build #IU-202.6948.69, built on August 24, 2020
Licensed to   / Kean Erickson
Subscription is active until February 1, 2021
Runtime version: 11.0.8+10-b944.31 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 10 10.0
GC: ParNew, ConcurrentMarkSweep
Memory: 2014M
Cores: 4
Registry: ide.appIcon.requestAttention=false
Non-Bundled Plugins: String Manipulation, VisualVMLauncher, org.jetbrains.plugins.spotbugs, com.mnw.tabmover, cz.daku.intellij.extraActions, luonq.ScrollFromSource, com.jetbrains.upsource,

Comment actions Permalink

let's try this:

go to File | Settings | Database | General and set 'otherwise execute' option to 'whole script'.

let me know if it helps.

Comment actions Permalink

Yup that fixed it, I can use the query shortcut now. Thanks!


Please sign in to leave a comment.