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

Add ESC-v to facilitate edit and execute function #3795

Open
cshintov opened this issue Oct 21, 2023 · 2 comments
Open

Add ESC-v to facilitate edit and execute function #3795

cshintov opened this issue Oct 21, 2023 · 2 comments
Labels
Feature requests Feature Requests

Comments

@cshintov
Copy link

cshintov commented Oct 21, 2023

Discord username (optional)

who_isjohngalt

Description

Pressing ESC v in Vi command line editing mode is the same as pressing Ctrl+X Ctrl+E in Emacs command line editing mode. It brings up the editor specified by $VISUAL or $EDITOR (or emacs if the environment variables VISUAL and EDITOR are unset) for you to edit the current command in a temporary file. Save the file and exit the editor to execute the command.

From the bash manual (which does not document the Vi commands):

    edit-and-execute-command (C-x C-e)

Invoke an editor on the current command line, and execute the result as shell commands. Bash attempts to invoke $VISUAL, $EDITOR, and emacs as the editor, in that order.

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

@djmango 's ux improvement idea.

#159 (comment)

One bug/UX issue I've noticed, when using J/K to scroll command history, it is essentially impossible to edit multiline commands as J/K just goes to the next/prev commands instead of navigating lines of the command. You are only able to edit without running by clicking with a mouse/trackpad, which defeats the purpose of VIM

Additional context

Screencast I recorded using this feature outside Warp.

https://asciinema.org/a/meLLPfvoHHTZRqGeU5nhzh1HO

@lucieleblanc Issue raised as you requested :)

#159 (comment)

How important is this feature to you?

5 (Can't work without it!)

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

None

@cshintov cshintov added the Feature requests Feature Requests label Oct 21, 2023
@dannyneira
Copy link
Member

Thanks for this feature request!

To anyone else interested in this feature, please add a :+1: to the original post at the top to signal that you want this feature, and subscribe if you'd like to be notified.

@lucieleblanc
Copy link

Thank you again for raising this @cshintov! As of the latest version of Warp, j and k should work for editing multi-line commands; they'll move the cursor up and down within the Input Editor first, and only navigate through command history when on the top or bottom line. Hopefully this addresses the UX issue @djmango brought up as well.

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

No branches or pull requests

3 participants