Skip to content

Support more external editors #2487

Closed
Closed

Description

@theconsultant

I already use BBEdit on OS X, and would prefer to continue doing so. Is there a way I can add it in as my default editor? I can open files into it from the command line and it works fine as a git commit editor, as I have this setup in my ~/.profile :

#editor
EDITOR='/usr/local/bin/bbedit'
export EDITOR

If Github Desktop were to look for my existing editor in my environment variables.. that would be too easy ;-)

Could I add in the command line option to edit files using BBEdit in a config file somewhere? or, as a simpler alternative, if I could select a file (usually in History..) then invoke a menu item (Under Repository, for example) to show the file itself in the Finder, instead of the repo, that would resolve my issue.

Version

Github Desktop 0.8.0
macOS 10.12.6

Activity

  1. shiftkey commented on Aug 17, 2017

    @shiftkey
    Member

    @theconsultant currently the "Open in External Editor" experience is focused on Atom, VS Code and Sublime Text. These were chosen because they are cross-platform and have a known CLI interface that Desktop can invoke. We don't use the GIT_EDITOR or EDITOR environment variables because those are focused on editing a file, rather than opening a folder.

    I'm not opposed to integrating new editors, I just haven't had a chance to think about how to handle editors that don't quite fit the existing infrastructure (see #2484 for example).

    Please read over the editor-integration.md docs as a starting point.

  2. theconsultant commented on Aug 17, 2017

    @theconsultant
    Author

    Thanks @shiftkey .. is the beta using a different system than the classic github desktop app? Because in the desktop version I can go into history, right click a file and choose "open with external editor" which does invoke my EDITOR environment.

    screen shot 2017-08-17 at 7 03 53 pm

    I've read that Technical Doc.. i'd guess some digging to understand the shim/cli interface would be useful, but not for the main project. Is there any further docs, or files, I can look at to see how it works?

    Thanks for your help, much appreciated!

  3. shiftkey commented on Aug 17, 2017

    @shiftkey
    Member

    @theconsultant the new app isn't currently using EDITOR for opening a changed file - it's using Electron's openItem API, which defers to what the OS has registered for the file extension. This behaviour isn't set in stone, and is probably something we should discuss further.

    cc @desktop/core

  4. shiftkey commented on Aug 31, 2017

    @shiftkey
    Member

    Support for Notepad++ (Windows-only) has been requested over in #2551 and while I thought it didn't support opening a folder like VSCode/Atom/Sublime do I see this is currently the case.

  5. changed the title [-]Use editors other than Atom?[/-] [+]Support more editors[/+] on Sep 11, 2017
  6. Ben3eeE commented on Sep 13, 2017

    @Ben3eeE

    A portable mode installation of Atom is currently not supported.

    This came up in #2585 (comment)

  7. IdanAdar commented on Sep 23, 2017

    @IdanAdar

    <blasphemy>I'd love to put WebStorm in the list of editors...</blasphemy>

  8. changed the title [-]Support more editors[/-] [+]Support more external editors[/+] on Sep 25, 2017
  9. shiftkey commented on Sep 27, 2017

    @shiftkey
    Member

    The development version of Atom doesn't add itself to the registry, and thus won't be detected by Desktop - #2894

  10. shiftkey commented on Oct 16, 2017

    @shiftkey
    Member

    A request for Typora - #3015

  11. shiftkey commented on Oct 16, 2017

    @shiftkey
    Member

    A request for Brackets - #3041

  12. shiftkey commented on Oct 24, 2017

    @shiftkey
    Member

    Hey all, we've made some progress here with supporting external editors in #3038. You can also see the latest documentation about this here: docs/technical/editor-integration.md

    We'll continue to move requests for supporting different editors into this thread rather than adding them to our roadmap for a couple of reasons:

    • we're resource limited on tackling core features and quality in the short-term
    • this feature is relatively isolated from the rest of the codebase, so it's should be approachable for someone who wants to contribute
    • the people using these editors are going to be more familiar than us about how they work and how to hook into them

    The setup guide should help ensure you have everything you need to run the development version of Desktop and get hacking - you can run the app in development mode alongside with your existing Desktop installation.

    If you stumble upon a problem or have a question about the integration itself, feel free to comment here. It's easy to either update the docs or fix the core integration, if that's what's required.

  13. shiftkey commented on Oct 24, 2017

    @shiftkey
    Member

    A request for Visual Studio 2017: #3148

  14. theconsultant commented on Oct 25, 2017

    @theconsultant
    Author

    Thanks to @NiklasBr there's a PR in progress for BBEdit.. #2941

  15. coyoteconscious commented on Nov 27, 2017

    @coyoteconscious

    How about making any editor available as an external, with the caveat that not all editors will have access to all features? I've been using the same editor for twenty years, and use it literally for everything (and have extensive clippings libraries and other custom stuff I use with it), but the only option I get for an external editor is Atom? Not cool.

  16. j-f1 commented on Nov 27, 2017

    @j-f1
    Contributor

    @coyoteconscious The challenge with supporting any editor is that we have to be able to figure out how to tell it to open a directory, which is hard or impossible to autodetect. What editor are you using?

  17. haacked commented on Nov 28, 2017

    @haacked
    Contributor

    @coyoteconscious The challenge with supporting any editor is that we have to be able to figure out how to tell it to open a directory, which is hard or impossible to autodetect. What editor are you using?

    Rather than autodetect that, starting with a manual configuration with placeholders would make sense. That way Desktop could support any editor by telling Desktop exactly how to open a file or directory.

  18. shiftkey commented on Nov 28, 2017

    @shiftkey
    Member

    Rather than autodetect that, starting with a manual configuration with placeholders would make sense. That way Desktop could support any editor by telling Desktop exactly how to open a file or directory.

    I'm 👎 on this for a few reasons:

    First, there's three variables that we need to track as part of launching an external program (these are the variables for shells, editors might be easier but I'm assuming worst-case complexity):

    • where the executable is located
    • any arguments that need to be passed to the executable
    • other options to provide when spawning the process in Node (some shells specify cwd or shell, others do not)

    Second: we didn't have any sort of support for supporting arbitrary editors in the classic apps. We should be mindful about providing an escape hatch like this, because users do get attached to features once they ship.

    Third: we've already had some success with editor and shell support from the community - getting things merged into core means all users gets the benefits, rather than every user having to manage settings themselves.

    Fourth: this would deviate from what our shell integration supports - do we then let people configure that?

  19. haacked commented on Nov 28, 2017

    @haacked
    Contributor

    Fair points. 😄

  20. simoniz0r commented on Dec 17, 2017

    @simoniz0r

    IMO, the user should be able to choose any editor. GitHubDesktop could provide something like %s for the filename/directory that would be opened so that the user could add the necessary arguments to their editor to have the file/directory be opened.

    Having a custom input box for the editor where I could enter something like /usr/bin/code -r %s would be great!

    :EDIT: Also, for what it's worth, pretty much all Linux editors support being invoked from the command line, so that should not be an issue here.

  21. gtraxx commented on Mar 21, 2018

    @gtraxx

    Hi, PHPSTORM is available in the list with Windows 10 ?

  22. agisilaos commented on Mar 21, 2018

    @agisilaos
    Member

    Hello @gtraxx! PhpStorm is not currently supported in Github Desktop for Windows. If you're considering adding this integration in Github Desktop for Windows, take a look at the Editor Integration Doc. The team will be more than happy to review your PR and help you with your contribution.

    Let me know if you have any other questions.

  23. iAmWillShepherd commented on Mar 22, 2018

    @iAmWillShepherd
    Contributor

    @gtraxx, a list of supported editors for Windows can be found here. As @agisilaos said, if you'd like support for PHPStorm to be added, feel free to open a PR or open a new issue for it so someone from the community can tackle it. Instructions are also in the link above.

  24. locked as resolved and limited conversation to collaborators on Mar 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions