joereynolds / SQHell.vim

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

Potentially add setting to change how SQHResults buffers are created? #42

Closed misterbuckley closed 6 years ago

misterbuckley commented 6 years ago

This would change what happens to results from the :SQHExecute(File) commands. Setting could be like g:sqh_results (name can be whatever), with a few options:

joereynolds commented 6 years ago

I did already want to do this but closed it off as I began to prefer the default behaviour. I'll try and look into it again, the problem I was had was using <c-o> and <c-i> to jump to previous buffers, it wouldn't work.

https://github.com/joereynolds/SQHell.vim/issues/7

misterbuckley commented 6 years ago

I think it would be good to have the option. Maybe it's from my years of using tools like Postico that work this way, but I personally much prefer writing all of my queries in one buffer and only having a single output window. It just keeps the UI cleaner imo.

joereynolds commented 6 years ago

Okay I found out how to do it, it's a 1 character fix (changing new to enew) so I'll add this in

The only thing that might be a bit janky is the jump list since the post formatting of each provider will screw with it a bit but that can be fiddled with separately

joereynolds commented 6 years ago

This is now on by default and the jumplist is unaffected. Implemented here: https://github.com/joereynolds/SQHell.vim/commit/d11193cba045737984aea946958d04d9d5fd285a

I don't think I'll add the option to have this split (for now) however I think this will need some more work as we go