To enable these links, you need to register a custom URL Scheme handler for your platform. The name of the custom URL Scheme is (clever, huh?).

In this example, I will be using MacVim. If you're using Sublime, you will want to change the path to your Sublime installation.

  • Find the application you want to handle the goconvey URL protocol handler: /Applications/MacVim.app
  • Edit the Info.plist file. There are two ways to do this:

    • Using your terminal:

      • Edit /Applications/MacVim.app/Contents/Info.plist
      • Find the section that has
      • Add a new <dict> entry that looks like this (lines 1198 - 1207):
        11. Opening files in your editor from the Web UI - 图1

If you don't have an <array> section, then create it.

    • In Finder, navigation to the Applications folder and right click on your application and click "Show Package Contents":

    • Open up the Contents folder and double click on the Info.plist file.

    • Find the section labeled URL types:
      11. Opening files in your editor from the Web UI - 图2

    • Expand the section and create an entry (by clicking on the "plus" icon) that looks like this:

You want to select as the Document Role, and the string entry inside the URL Schemes section must be goconvey.

If everything went well, you should click on the Line # link in GoConvey's web UI and get a prompt from your browser:

Click "Launch Application" (and you'll probably want to check the "Remember…" checkbox as well.

Until someone comes up with a good tutorial, here are some resources:

To install a customer schema handler, at least in Ubuntu, you can use the script below. It will install a script that handles the links in GoConvey's web GUI and formats it to work with the browsers, at least Visual Studio Code and Sublime. It will also register a desktop handler for the goconvey:// schema.

It uses your default editor if the environment variable EDITOR is set.If you like to use a separate editor just for goconvey links, you can set GOCONVEY_EDITOR.Some editor need extra flags to handle filenames with line number. These flags can be set in GOCONVEY_EDITOR_FLAGS.If no editor environment variables are set it defaults to Visual Studio Code.

This script is tested on Ubuntu 16.04 with Unity.

Save the content below in a file and run it as root.

  1. #!/usr/bin/env bash
  2.  
  3. #!/usr/bin/env bash
  4. request="\${1#*://}" # Remove schema from url (goconvey://)
  5. request="\${request#*?url=}" # Remove open?url=
  6. request="\${request#*://}" # Remove file://
  7. request="\${request//%2F//}" # Replace %2F with /
  8. request="\${request/&line=/:}" # Replace &line= with :
  9. request="\${request/&column=/:}" # Replace &column= with :
  10. if [ -n "\${GOCONVEY_EDITOR}" ]; then
  11. \$GOCONVEY_EDITOR \$GOCONVEY_EDITOR_FLAGS "\$request" # Launch specified goconvey editor
  12. elif [ -n "\${EDITOR}" ]; then
  13. \$EDITOR \$GOCONVEY_EDITOR_FLAGS "\$request" # Launch default editor
  14. else
  15. code -g "\$request" # Launch code as editor
  16. fi
  17. EOF-HANDLER
  18.  
  19. cat <<EOF-DESKTOP > /usr/share/applications/goconvey-handler.desktop
  20. Name=GoConvey URL Handler
  21. GenericName=Text Editor
  22. Comment=Handle URL Scheme goconvey://
  23. Exec=/usr/bin/goconvey-handler %u
  24. Terminal=false
  25. Type=Application
  26. MimeType=x-scheme-handler/goconvey;
  27. Icon=code
  28. Categories=TextEditor;Development;Utility;
  29. Name[en_US]=GoConvey URL handler
  30. EOF-DESKTOP
  31.  
  32. chmod +x /usr/bin/goconvey-handler
  33. update-desktop-database
  34. xdg-mime default /usr/share/applications/goconvey-handler.desktop x-scheme-handler/goconvey