Comments (19)
I'm not sure I understand. What you mean by this?
but it lost mapping from (DBUI_SaveQuery) to the real action
what is a real action?
from vim-dadbod-ui.
I meant the command abstract map points to: :call <SNR>185_method('save_query')<CR>
from vim-dadbod-ui.
Plug map points to the function call, and ,W
points to the plug mapping. What's wrong in that?
from vim-dadbod-ui.
Nothing wrong: the second image comes from the fresh running DBUI
where mapping still exists. The first one illustrates the problem.
Maybe I can send you some additional information that can help.
from vim-dadbod-ui.
Ok, I get it. <Plug>(DBUI_SaveQuery)
is not attached when viewing already saved query. It is available only for "new" queries. Would you expect it to work also for saved queries, or not to bind ,W
when it is not available?
from vim-dadbod-ui.
Independently of this bug ("keyboard->abstract" mapping is available also when "abstract->real" not) I would like to can save such query once again. We could then overwrite existing query, so the new filename (the old name by default) would be possible to edit in the save dialog.
On the other side, there is no problem to do it at the Vim level. With the recent fixes manually saved query buffers seems to behave in the same way as auto-generated query buffer (it require more tests to ensure).
from vim-dadbod-ui.
I pushed a fix ~30 min ago that binds the mapping if you use custom g:db_ui_tmp_query_location
. I guess we could always have the mapping.
from vim-dadbod-ui.
OK, I pulled this change to observe if the mapping will be then more persistent.
from vim-dadbod-ui.
Ok, let me know if you see anything strange.
from vim-dadbod-ui.
The problem still exists when I try to load (from the drawer) any saved query buffer that was loaded before DBUI started. Please run:
badd path/to/saved/query/buffer
DBUI
It occurs after load vim session with such buffer.
from vim-dadbod-ui.
bwipeout
on such query buffer can be a workaround at the moment.
from vim-dadbod-ui.
Filetype is not recognized. Instead of bwipeout
we can set ft=sql
and DBUI is able to execute the query again.
Why not to add sql
file extension (to any DBUI buffer file) by default (independently of the way of setting filetype)?
from vim-dadbod-ui.
The problem still exists when I try to load (from the drawer) any saved query buffer that was loaded before DBUI started. Please run:
badd path/to/saved/query/buffer DBUIIt occurs after load vim session with such buffer.
What happens if you do :DBUIFindBuffer
after this?
from vim-dadbod-ui.
badd path/to/saved/query/buffer
DBUI
wincmd w
b 2
From this point I have two scenarios: with
DBUIFindBuffer
the buffer appears on Buffers list (named as its saved equivalent), but I have still not populated saved queries list (0 items, opening/closing does not refresh the list, all saved queries on the buffer list are displayed). After opening the buffer from Buffers list the query has still no sql
filetype.
With opening database view in the drawer first, saved queries list is populated, but the rest is the same. The buffer behaves as non-sql buffer.
from vim-dadbod-ui.
I pushed some updates for DBUIFindBuffer. This was improved/fixed:
- SQL filetype is automatically set if file is not
*.sql
file. - It automatically detects the database it needs to belong to, if buffer is a file in the folder of saved queries, no prompts like before.
- Autocmd for automatically execute on save is properly attached.
Please give it a test and let me know how it looks now.
from vim-dadbod-ui.
Preloaded buffers after unhiding it by the action on drawer or re-associating with DBUI by :DBUIFindBuffer
are now usable as expected. It seems unlikely I will encounter a similar problem so we can close this issue and possibly open any new.
Thanks for investingating this behaviour.
from vim-dadbod-ui.
I missed one thing that was not fixed: the buffer activated with :DBUIFindBuffer
is shown on Buffers
list. Saved queries list and tables list still remain empty and even impossible to populate by keyboard action.
from vim-dadbod-ui.
Should be fixed now. You can always redraw the current database by pressing R
while cursor is inside the database tree. This is now done automatically.
from vim-dadbod-ui.
Confirmed 🎉
from vim-dadbod-ui.
Related Issues (20)
- MongoDB filtetype javascript HOT 6
- Disable notifications HOT 2
- Using dadbod-ssh with dadbod-ui not working
- [Bug] Error parsing connections.json
- Hit enter prompt even when using nvim-notify HOT 3
- Replace binary values in output HOT 2
- enhancement: pagination HOT 2
- Hooks support
- Prompt for password HOT 1
- Support for listing all database to connected database server
- Requirement to execute single query under cursor HOT 2
- Table Structure not showing properly. HOT 2
- Store query time per dbout buffer
- Ability to remove, reorder (or sort) preset table helpers
- Move the DBUI section to right HOT 1
- Possible to Add Option for Nvim-Notify to Track Query Time? HOT 4
- Keep the query output open while updating the query HOT 1
- Open query results in a window instead of a buffer
- Feature Request: Enhance Foreign Key Lookup to Consider Current Database Context in `schemas.vim`
- Cursorline and default mappings HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-dadbod-ui.