3 final class PhabricatorEditorSetting
4 extends PhabricatorStringSetting
{
6 const SETTINGKEY
= 'editor';
8 public function getSettingName() {
9 return pht('Editor Link');
12 public function getSettingPanelKey() {
13 return PhabricatorExternalEditorSettingsPanel
::PANELKEY
;
16 protected function getSettingOrder() {
20 protected function getControlInstructions() {
22 "Many text editors can be configured as URI handlers for special ".
23 "protocols like `editor://`. If you have installed and configured ".
24 "such an editor, Phabricator can generate links that you can click ".
25 "to open files locally.".
27 "Provide a URI pattern for building external editor URIs in your ".
28 "environment. For example, if you use TextMate on macOS, the pattern ".
29 "for your machine may look something like this:".
31 "```name=\"Example: TextMate on macOS\"\n".
35 "For complete instructions on editor configuration, ".
36 "see **[[ %s | %s ]]**.".
38 "See the tables below for a list of supported variables and protocols.",
39 'txmt://open/?url=file:///Users/alincoln/editor_links/%n/%f&line=%l',
40 PhabricatorEnv
::getDoclink('User Guide: Configuring an External Editor'),
41 pht('User Guide: Configuring an External Editor'));
44 public function validateTransactionValue($value) {
45 if (!phutil_nonempty_string($value)) {
49 id(new PhabricatorEditorURIEngine())