Closed tconbeer closed 1 week ago
This sounds absolutely awesome. Seriously. Just wanted to say that before i click on the "Sponsor" button. :)
@cs2018ncsa Thank you so much for your support!
Super exciting stuff, can't wait to try out vim bindings, even in a limited form.
Harlequin will have essentially no bindings without the default map (maybe just ctrl+q), and then will merge and load keymaps at start-up.
What about the key combinations at the bottom of Harlequin like CTRL+J
, CTRL+S
, etc.?
I'm guessing the answer is yes, but will Mac-specific keys be supported?
Yes, this includes all of those, like ctrl+j
.
You should be able to use any key combo that works for your terminal and gets forwarded to Harlequin... sometimes the virtual key names change a bit, but I think most terminals map cmd to ctrl, etc.
I just discovered this (through Terminal Trove) and this is the only feature that I find missing. I keep battling between using vim motions and default shell shortcuts to navigate between words in the query panel, but none work exactly as I would expect. Having a way to customize the keybindings to navigate between panels and other actions would be a killer feature.
So very much looking forward to this, I am an HHKB user on macOS with iterm2/alacritty/vscode-terminal/nvim-terminal.
ctrl-j was mapped to "down" for me so for now ctrl-enter is my hope but I tested with textual keys, and ctrl-enter
was now enter
in all above tty envs.
If this one feature was implemented this would replace every GUI/based database editor, vim-dadbod, and lazysql overnight.
This should be the single biggest priority of this project imo. Mainly because the default keybindings aren't that good. Like F2, F5 and F6 to switch windows...what? Imagine navigating with vim keybindings like hjkl and writing custom keymaps for queries and stuff. This app is really good so far and soooo close to finally being the way to interact with sql databases via the terminal which is like 30 years overdue.
@s1nistr4 I'm pretty annoyed by your tone, but yeah, I'm working on this. Well, actually right now I'm visiting family in the hospital but maybe after that I'll get back to working on this.
@s1nistr4 I'm pretty annoyed by your tone, but yeah, I'm working on this. Well, actually right now I'm visiting family in the hospital but maybe after that I'll get back to working on this.
It wasn't meant to be rude, I'm just saying you can monopolize the industry you're in overnight if this was implemented. If anything it's to help you and your project succeed. Harlequin is so far the best TUI SQL client I've used out of the many I've tried.
I'm visiting family in the hospital
Hoping he/she will be fine soon.
@s1nistr4 I'm pretty annoyed by your tone, but yeah, I'm working on this. Well, actually right now I'm visiting family in the hospital but maybe after that I'll get back to working on this.
Priorities! Hope everything is ok. You've already done such an incredible favor to the community. Thank you.
This has been shipped in v1.22.0
Vim motions present a suite of challenges that will have to be tackled later; for now, though, you can customize bindings to any single key press. See the new docs: https://harlequin.sh/docs/keymaps/index
This has been shipped in v1.22.0
Vim motions present a suite of challenges that will have to be tackled later; for now, though, you can customize bindings to any single key press. See the new docs: https://harlequin.sh/docs/keymaps/index
It worked like a charm! Thanks!!!
Hoping to satisfy #371 and #422 with the following design. VS Code docs on their config were informative.
Rough process is:
a binding config will be an Array of Tables:
Harlequin will discover the config and load them into a
HarlequinKeyMap
class with aname='my_keys'
attribute. OtherHarlequinKeyMap
s will be discovered as plug-ins, including the default keymap,HarlequinVSCodeKeyMap
(name='vscode'
).In the profile, a user can configure the active key map(s); also at the command line:
--keymap vscode --keymap my_keys
. If given multiple maps, Harlequin will merge them, last one given priority.Harlequin will have essentially no bindings without the default map (maybe just ctrl+q), and then will merge and load keymaps at start-up.
We should create an action that loads a keymap, so that it can be bound to a key to enable multiple "modes" like in Vim.
Finally, there should be some kind of keymap editor that spits out a keymap config and writes it to a config file. Would be great if that gave feedback on the keys currently being pressed, since it's not intuitive which key combinations will or won't work for each terminal. This can be its own Textual app, maybe
harlequin --keys