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
Change default editor to in-terminal #2915
Comments
The default is vim, which runs in the terminal, so I don't think I understand your proposal. |
well for me with no $HOMEBREW_EDITOR and no $EDITOR set it is defaulting to atom with Editing /usr/local/Homebrew/Library/Taps/homebrew/homebrew-science/wopr.rb showing up. it is only in the last couple of days it has changed from vim and i have no idea why |
|
|
Can you please post the output of |
|
Please try this:
Then please post |
same result defaulted to atom 486d3d8 is likely the commit that is causing the issue as i do not have any of the previous-to-commit editors installed |
Ah, yeah, that seems likely. I think you'll need to set HOMEBREW_EDITOR=vim in that case since this behavior is intentional. |
hence the bug report proposal to make the default in-terminal. to get back to normal usage of brew do i just unset HOMEBREW_UPDATE_TO_TAG and brew update? |
Yes. |
Considering how hard it is to exit vim if you don’t know how, making it the default is not a really user-friendly idea. And which other CLI editor would be appropriate? nano? Very few people would be happy with that as well. Even amongst developers and technical users, there’s a common fear and misticism of the command-line. Many can use Homebrew due to its convenience but are not well-versed in much more. Having popular GUI editors that people know is the most sensible default. Changing defaults is an advanced feature, as is using an advanced editor. If you use vim, you know how to change a default. If you use atom, you might not. |
On the flip side, it is really jarring to have |
I sympathize with both those points - hard to exit vim, and a little odd to pop up an external editor since What do folks think of defaulting to |
while i am a vim user i realise that most are not, but i think nano/pico are much saner defaults than a gui editor |
Oh lord, I remember trying to work out how to escape
|
as long as you know what '^' stands for |
Yep. And that is not exactly obvious either. But my main issue with nano or pico is that they’re defaults no one™ will ever want. At least atom is used by many people. Unless more users complain, I see no reason to change the default — it’s a good one. A single user complaint from someone who can change the default, and in which changing the default is part of features of the program, is hardly a compelling basis to make the switch. Otherwise we’ll just bikeshed which limited-CLI-editor-no-one-really-uses-regulalry-and-will-want-to-change-right-away to use. |
We don't really get any complaints from people about the default being vim, and most users do not have one of the "chosen" GUI editors installed, so I'm not sure why vim wouldn't be a satisfactory default. |
We don’t. StackOverflow does.
Because you care about user experience, and having people stuck on a step and unable to exit makes them feel bad unnecessarily. |
StackOverflow is not evidence of a problem if we're not actually getting any complaints. |
What is particularly unfriendly about the current behavior is that if you use |
that is definitely a problem |
I'd like to see the current behaviour remain as-is (as it has been pretty much as long as Homebrew has existing) until we get many, many more complaints. Changing the current defaults will surprise everyone who relies on it whereas @xzcvczx now has a solution to their problem.
This isn't great behaviour and we can handle it by checking for |
👍 |
i am curious as to whether it is people liking or even being aware of the behaviour when if they don't have any of the mentioned apps installed its just falling back to vim anyway, so (not saying it is) but vim might be the primary editor that people use by default anyway. |
A lot of people do have the mentioned apps installed and changing the default to |
Passing on this for now. |
Or propose a feature:
As brew is primarily interfaced with from terminal would it not make more sense for the hardcoded default text editor to be one that also runs in the terminal? I am aware that it is easy to change the default.
As there are many casual users of brew who likely just want to check something in a recipe they likely expect it to just open inside of the terminal window, and for those who do a lot of editing/creating of recipes they likely expect to change settings for their preferred choice of editor.
The text was updated successfully, but these errors were encountered: