diff options
Diffstat (limited to 'pkg/config')
-rw-r--r-- | pkg/config/config_default_platform.go | 3 | ||||
-rw-r--r-- | pkg/config/config_linux.go | 3 | ||||
-rw-r--r-- | pkg/config/config_windows.go | 3 | ||||
-rw-r--r-- | pkg/config/user_config.go | 5 |
4 files changed, 10 insertions, 4 deletions
diff --git a/pkg/config/config_default_platform.go b/pkg/config/config_default_platform.go index fabdf8a88..cb6e338df 100644 --- a/pkg/config/config_default_platform.go +++ b/pkg/config/config_default_platform.go @@ -5,7 +5,8 @@ package config // GetPlatformDefaultConfig gets the defaults for the platform func GetPlatformDefaultConfig() OSConfig { return OSConfig{ - EditCommand: ``, + Editor: ``, + EditCommand: `{{editor}} {{filename}}`, OpenCommand: "open {{filename}}", OpenLinkCommand: "open {{link}}", } diff --git a/pkg/config/config_linux.go b/pkg/config/config_linux.go index 8399e0e47..1eed335f0 100644 --- a/pkg/config/config_linux.go +++ b/pkg/config/config_linux.go @@ -3,7 +3,8 @@ package config // GetPlatformDefaultConfig gets the defaults for the platform func GetPlatformDefaultConfig() OSConfig { return OSConfig{ - EditCommand: ``, + Editor: ``, + EditCommand: `{{editor}} {{filename}}`, OpenCommand: `sh -c "xdg-open {{filename}} >/dev/null"`, OpenLinkCommand: `sh -c "xdg-open {{link}} >/dev/null"`, } diff --git a/pkg/config/config_windows.go b/pkg/config/config_windows.go index f6780eb6b..1bc919848 100644 --- a/pkg/config/config_windows.go +++ b/pkg/config/config_windows.go @@ -3,7 +3,8 @@ package config // GetPlatformDefaultConfig gets the defaults for the platform func GetPlatformDefaultConfig() OSConfig { return OSConfig{ - EditCommand: ``, + Editor: ``, + EditCommand: `{{editor}} {{filename}}`, OpenCommand: `cmd /c "start "" {{filename}}"`, OpenLinkCommand: `cmd /c "start "" {{link}}"`, } diff --git a/pkg/config/user_config.go b/pkg/config/user_config.go index 38259f6f2..ea079948e 100644 --- a/pkg/config/user_config.go +++ b/pkg/config/user_config.go @@ -252,7 +252,10 @@ type KeybindingSubmodulesConfig struct { // OSConfig contains config on the level of the os type OSConfig struct { - // EditCommand is the command for editing a file + // Editor is the command for editing a file + Editor string `yaml:"editor,omitempty"` + + // EditCommand is the command template for editing a file EditCommand string `yaml:"editCommand,omitempty"` // OpenCommand is the command for opening a file |