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

Use the preferred file editor configured in git? #61

Open
foucdeg opened this issue Sep 25, 2018 · 4 comments
Open

Use the preferred file editor configured in git? #61

foucdeg opened this issue Sep 25, 2018 · 4 comments

Comments

@foucdeg
Copy link

foucdeg commented Sep 25, 2018

Something like EDITOR=$(git config --get core.editor)

@foucdeg foucdeg changed the title Use the preferred file editor configured in git instead of always Vim Use the preferred file editor configured in git? Sep 25, 2018
@foucdeg
Copy link
Author

foucdeg commented Sep 25, 2018

@williamdclt After reading more on this, it seems that the env variable you used, EDITOR, is a system-wide standard, which git actually uses if you don't specify core.editor.
So I guess I could export EDITOR=whatever too.

@williamdclt
Copy link
Owner

Yeah I have export EDITOR=vim in my .zshrc :) But using the git editor definitely makes sense, a PR would be welcome

@foucdeg
Copy link
Author

foucdeg commented Sep 26, 2018

which do you think should take precedence between EDITOR and git config --get core.editor ?

@williamdclt
Copy link
Owner

git config --get core.editor, like in git itself

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

No branches or pull requests

2 participants