kristijanhusak / vim-dadbod-ui

Simple UI for https://github.com/tpope/vim-dadbod
MIT License
1.54k stars 94 forks source link

How to run query that is saved outside of db_ui_save_location #176

Closed SebastianBehrens closed 1 year ago

SebastianBehrens commented 1 year ago

When editing old files (not saved in let g:db_ui_save_location), it seems I need to either copy the content (into the buffer created by the new query option in the drawer) or move the file into thedb_ui_save_location path to execute it.

I tried S but it is substituting the line when the file is not opened via the dbui drawer.

So I wonder is there a way to execute such .sql files without moving the files or copying the contents?

kristijanhusak commented 1 year ago

Executing :DBUIFindBuffer should show you a prompt to select the database if it can't figure out where it belongs. Then it will become a part of buffers, at least for the current session.

SebastianBehrens commented 1 year ago

Thank you!