vim-dadbod
vim-dadbod copied to clipboard
Vertical split preview window
Is it possible to open the preview window vertically?
I run the command, c-w H to move it vertical to see the results, start typing to amend the query, and then the preview autocloses after a few seconds. I could easily write a function that runs the DB command and then does the split move, but I was wondering if you think making it an option makes sense?
I don't like options for stuff like this, but support for <mods>, which would enable :vert DB, would be a nice enhancement.
Yeah that would great :) I did wrap the DB call in a function which does the c-w H automatically, but it ruins the layout when there are multiple splits open. Easily solved by two functions, but support out the box would be cool.
Also (sort of related) the dadbod split auto-closes for some reason. Do you know if dadbod is auto-closing or if that's a vim thing? I'm unsure how to work it out!
Auto-closes when? Dadbod doesn't close it but there are reasons Vim would (:pclose for example).
It's fairly reproducible:
$ vim test.sql i SELECT * FROM users; V :DB o SEL << at that point the DB window closes.
I've tried it with waiting and nothing happens, so it seems to be something linked to typing but I can't work it out. But if you don't think it's dadbod related then it must be some other plugin being funky!
Sounds like an autocomplete plugin.
I have the same issue. It's definitely caused by deoplete.
I'm just doing this right now, which completely destroys deoplete for the whole vim instance, but it works for me cause I only work on sql files in their own separate vim instances anyway.
autocmd FileType sql autocmd! deoplete *