Something went wrong. Try again.
@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879@title User Guide: Configuring an External Editor@group userguideSetting up an external editor to integrate with Diffusion and Differential.Overview========You can configure a URI handler to allow you to open files referenced inDifferential and Diffusion in your preferred text editor on your localmachine.Configuring Editors===================To configure an external editor, go to {nav Settings > Application Settings >External Editor} and set "Editor Link" to a URI pattern (see below). Thiswill enable an "Open in Editor" link in Differential, and an "Edit" button inDiffusion.In general, you'll set this field to something like this, although theparticular pattern to use depends on your editor and environment:```lang=urieditor://open/?file=%f```Mapping Repositories====================When you open a file in an external editor, Phorge needs to be able tobuild a URI which includes the correct absolute path on disk to the localversion of the file, including the repository directory.If all your repositories are named consistently in a single directory, youmay be able to use the `%n` (repository short name) variable to do this.For example:```lang=urieditor://open/?file=/Users/alice/repositories/%n/%f```If your repositories aren't named consistently or aren't in a single location,you can build a local directory of symlinks which map a repositoriy identifierto the right location on disk:```/Users/alice/editor_links/ $ ls -l... search-service/ -> /Users/alice/backend/search/... site-templates/ -> /Users/alice/frontend/site/```Then use this directory in your editor URI:```lang=urieditor://open/?file=/Users/alice/editor_links/%n/%f```Instead of `%n` (repository short name), you can also use `%d` (repository ID)or `%p` (repository PHID). These identifiers are immutable and all repositoriesalways have both identifiers, but they're less human-readable.Configuring: TextMate on macOS==============================TextMate installs a `txmt://` handler by default, so it's easy to configurethis feature if you use TextMate.First, identify the parent directory where your repositories are stored(for example, `/Users/alice/repositories/`). Then, configure your editorpattern like this:```lang=uritxmt://open/?url=file:///Users/alice/repositories/%n/%f&line=%l```