Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tab for submit query in multiline mode isn't the best choice. #248

Closed
ardabro opened this issue Mar 23, 2024 · 6 comments
Closed

tab for submit query in multiline mode isn't the best choice. #248

ardabro opened this issue Mar 23, 2024 · 6 comments

Comments

@ardabro
Copy link

ardabro commented Mar 23, 2024

I think that a configuration file with keyboard shortcut definitions would be the best option, but anyway, TAB for submitting a query isn't the best choice. A programmer hits TAB compulsively and frequently to format code and it inevitably leads to incomplete, useless queries. What about ctrl+Enter?

@aandrew-me
Copy link
Owner

Fair point, if its possible, I will change it to Ctrl + Enter

@aandrew-me
Copy link
Owner

Ctrl+ Enter is not an available option :(
charmbracelet/bubbletea#927 (comment)

@ardabro
Copy link
Author

ardabro commented Mar 29, 2024

Hm... what about a command? like: go!<enter> or even only !<enter but only at the beginning of new line?
So the sequence would be: <enter>!<enter>

@aandrew-me
Copy link
Owner

Doesn't sound very reasonable to me

@schnz
Copy link
Contributor

schnz commented Mar 30, 2024

From a semantic standpoint, Ctrl+D (while cursor is placed at the very end in a new line) would be the most reasonable shortcut. It would be perfectly reasonable in the context of the Emacs bindings that bubbletea seems to support out of the box (e.g. Ctrl+A to go to the beginning of the line, etc.). When I first tried tgpt that was the shortcut that I tried first after realizing that in multiline mode "ctrl+enter" doesn't work.

This also would allow to manually paste texts (while in input mode) that contains a Tab character.

@aandrew-me
Copy link
Owner

From a semantic standpoint, Ctrl+D (while cursor is placed at the very end in a new line) would be the most reasonable shortcut. It would be perfectly reasonable in the context of the Emacs bindings that bubbletea seems to support out of the box (e.g. Ctrl+A to go to the beginning of the line, etc.). When I first tried tgpt that was the shortcut that I tried first after realizing that in multiline mode "ctrl+enter" doesn't work.

This also would allow to manually paste texts (while in input mode) that contains a Tab character.

I will change it to Ctrl + D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants