warpdotdev / Warp

Warp is a modern, Rust-based terminal with AI built in so you and your team can build great software, faster.
https://warp.dev
Other
21.37k stars 373 forks source link

Ability to disable Enter to accept autosuggestions #3767

Open LauraLangdon opened 1 year ago

LauraLangdon commented 1 year ago

Discord username (optional)

737336038372016269

Describe the solution you'd like?

I'd love to have the option to not have Enter accept autosuggestions.

Is your feature request related to a problem? Please describe.

I don't want Enter to accept autosuggestions, because when I type `git add .`, for instance, I can't just hit Enter to send the command; instead that will accept an autosuggestion to add a specific file instead of all files, which is what I'm trying to do. Hitting Esc before Enter works, but it's annoying to have to use an extra keystroke. But also! I enabled Vim bindings (😍), which of course means Esc switches me into Normal mode. So now instead of being able to just type `git add .` and hit Enter, I have to type `git add .`, then Esc, then i. 😭

In Settings -> Features -> Editor I've set the Tab key behaviour to accept autosuggestions, which I thought/hoped would mean Enter would no longer accept autosuggestions, but it actually means both of those keys accept autosuggestions.

Additional context

No response

How important is this feature to you?

4

Warp Internal (ignore) - linear-label:770f6576-d6c0-4e4f-a259-fc64b5156087

None

dannyneira commented 1 year ago

Hi @LauraLangdon thanks for submitting. So your issue may be due to the fact that "Completions as you type" is enabled, so when you see the completion menu, ENTER, accepts the current suggestion on the list. You can disable that in the settings, or you can also rebind the behavior for opening the completion menu, then TAB will pull up the menu on demand. Also, the "Tab key behavior" setting under Features > Editor can change the action that Tab is bound to. If Tab is not bound to open the completions menu, ctrl-space will be assigned as the default keybinding.

Please let me know if this helps with your use case, or what you'd like to see done differently.

LauraLangdon commented 1 year ago

Hmm, but I do want the completion menu to show up as I type. 😁 I just checked how Fig handles this, and '.' is actually the default suggestion in the git add . case, so I do get to have the completion menu show up as I type and hitting Enter results in the expected behaviour:

CleanShot 2023-10-12 at 19 35 46@2x

Whereas in Warp the default suggestion is '.idea': CleanShot 2023-10-13 at 09 26 43@2x