-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Enable fish to call $EDITOR on command line #2027
Comments
I suggest to replace the second
Look here: #1964 |
This will require cleverness to bind as |
@tannhuber The "--" prevents errors and is an improvement. Thank you. @zanchey Yea, I have no idea how to get a multi-key binding to actually work in fish. It is not so important what the binding is, just that the feature is there. |
The function Example:
|
@tannhuber Good catch on the loss of quotes. Definitely a problem. The commandline builtin is not outputting the quotes. This is bug #2210. |
This is actually a duplicate of #1215. |
To everyone who started to copy/paste the solution from here like me. This is not needed anymore. This got merged into fish and got even two shortcuts. Alt-e and Alt-v. Documentation: https://fishshell.com/docs/current/ (search for "edit the current command line in an external editor") |
This doesn't seem to work in MacOS I just get ´or √ instead - any ideas? |
@haakym: You want to confirm that $EDITOR (or $VISUAL) is set correctly. In particular if you set it to a GUI editor you need to make sure that it stays until you're done, frequently they fork off and let the shell return. For e.g. sublime this means using |
Hmm, to me it sounds like your terminal might be producing the Alternatively, try esc+e instead. |
@faho Thanks for your response. The initial issue was as @mfilej mentioned below, but you were right I didn't have the $EDITOR or $VISUAL var set correctly. I now have this working with Vim via
That's really handy to know as I was trying to get this working with VS Code and after exiting nothing ever happened. I've now got this working with @mfilej Thank you - Thanks again both for your help - really appreciate it! This is going to save my wrists some pain :) |
This function was originally written by Sanne Wouda and modified by Greg Reagle. This feature is available in Bash as edit-and-execute-command (C-x C-e), and in zsh as edit-command-line.
Can this function be a standard part of fish, and bound to a key such as Ctrl-x Ctrl-e?
The text was updated successfully, but these errors were encountered: