joereynolds / SQHell.vim

An SQL wrapper for vim
MIT License
131 stars 9 forks source link

Feature request: configurable output buffer position #51

Closed petobens closed 6 years ago

petobens commented 6 years ago

When I run SQHExecute on some sql file, the output buffer (i.e the one with filetype SQHResult) is placed on top of the original sql file. Personally I prefer if it could open as a split window at the bottom. Is this a feature that you plan to add? Thanks

joereynolds commented 6 years ago

Hey @petobens, this could be added in. It did originally all open in splits (like in the gifs in the README) is that close to what you want?

Yes, it's certainly doable! I'll take a look when I get the time

petobens commented 6 years ago

Thanks for the quick reply. Yep, exactly like the GIFs.

joereynolds commented 6 years ago

Hey @petobens,

We've made it configurable, there may be some future work to make it work a bit more intelligently, but for now I hope this satisfies

https://github.com/joereynolds/SQHell.vim/commit/efdc377d43ad15bb50fc08dce91913655c5c9a48

petobens commented 6 years ago

Thank you! Seems to work. Mm maybe could add an option to i) automatically adjust the height of the window to some max height (I generally ran testing queries with a hard limit of 5 and the output buffer hast too many lines blank lines) and ii) make it occupy the full window width (using botright)?

petobens commented 6 years ago

Also I think you should add colorcolumn=0 to the output buffer and maybe add a name to the buffer when creating it with new

joereynolds commented 6 years ago

colorcolumn will be inherited from whatever your options are I think, are you suggesting this because of performance reasons?

There's still a bit of work that needs to be done on this, Ideally, I'd like to open 1 split and re-use that split all the time

petobens commented 6 years ago

I meant that you might want to add setlocal colorcolumn=0 to avoid highlighting of columns in the output buffer.