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

Allow additional shortcuts for submitting gum write #423

Open
annervisser opened this issue Sep 17, 2023 · 4 comments
Open

Allow additional shortcuts for submitting gum write #423

annervisser opened this issue Sep 17, 2023 · 4 comments
Labels
cmd/write enhancement New feature or request

Comments

@annervisser
Copy link

Is your feature request related to a problem? Please describe.
While Ctrl+d is a unixy way of exiting a program, it doesn't feel logical to me as a "submit".

Describe the solution you'd like
I'd love some additional shortcuts for saving my text, Ctrl+s and Ctrl+x (Nano) come to mind.

It would also be helpful if the shortcut(s) were listed in the description of gum write --help

Describe alternatives you've considered
n/a

Additional context
Current documentation:

Note: CTRL+D is used to complete text entry. CTRL+C and esc will cancel.

Current output of gum write --help:

Usage: gum write

Prompt for long-form text

Flags:
 [...]

Style Flags
 [...]
@octoshrimpy
Copy link

second this. shift-enter is another one I recommend. relevant to #286 and #433

@caarlos0 caarlos0 added enhancement New feature or request cmd/write labels Nov 18, 2024
@caarlos0
Copy link
Member

I believe shift+enter requires kitty keyboard, which is coming on v2 (cc/ @aymanbagabas)

that said, I also don't like ctrl+d being used for this, but I agree ctrl+s and ctrl+x are better options

@meowgorithm
Copy link
Member

yep shift+enter will be possible in with Bubble Tea v2, however also keep in mind that in many terminals and multiplexers the feature simply won't be available (at least not by default). We can offer that when it is available.

Anyway, it will probably be helpful to show the options on the onscreen help (--show-help).

One question: isn't "submit" currently just enter?

@caarlos0
Copy link
Member

One question: isn't "submit" currently just enter?

you're right!

but there's another 'weirdness': ctrl+j is used to enter a new line, which I also don't like (and conflicts with my tmux mappings)... would probably bind that to shift+enter as well on v2, which seems to be more easy to figure out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmd/write enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants