Skip to content

Setup default editor #372

Closed
Closed

Description

@safv12

Describe the feature or problem you’d like to solve

I there any way to configure a default editor?
My default editor is vim, but gh is still using nano.

Proposed solution

A configuration option to choose default editor like git.`

gh config editor "vim"

Activity

  1. vilmibm commented on Feb 12, 2020

    @vilmibm
    Contributor

    👋 gh respects GITHUB_EDITOR, EDITOR, and VISUAL environment variables in that order. are those defined?

  2. safv12 commented on Feb 12, 2020

    @safv12
    Author

    The variables were not configured.
    I configured them and I can already use vim as editor.

    Thanks @vilmibm.

  3. billygriffin commented on Feb 12, 2020

    @billygriffin
    Contributor

    Thanks @safv12! We also have a documentation task in #308, so I'm going to close this. Appreciate the issue!

  4. jonathantneal commented on Mar 26, 2020

    @jonathantneal

    If it helps others, gh does not respect GITHUB_EDITOR at the time of this writing.

    gh does respect GIT_EDITOR, VISUAL, and EDITOR, which follows the git documentation at https://www.git-scm.com/book/en/v2/Git-Internals-Environment-Variables.

    This list is also available in the gh manual at https://cli.github.com/manual/installation#setting-an-editor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    more-info-neededMore info needed from user/contributor

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions