support mate (TextMate)

This commit is contained in:
Ivan Kuchin 2026-05-12 23:11:25 +02:00
parent c493503620
commit 19c1108b1d
6 changed files with 14 additions and 5 deletions

View file

@ -878,7 +878,7 @@ os:
editPreset: 'vscode'
```
Supported presets are `vim`, `nvim`, `nvim-remote`, `lvim`, `emacs`, `nano`, `micro`, `vscode`, `sublime`, `bbedit`, `kakoune`, `helix`, `xcode`, `zed` and `acme`. In many cases lazygit will be able to guess the right preset from your $(git config core.editor), or an environment variable such as $VISUAL or $EDITOR.
Supported presets are `vim`, `nvim`, `nvim-remote`, `lvim`, `emacs`, `nano`, `micro`, `vscode`, `sublime`, `bbedit`, `kakoune`, `helix`, `xcode`, `zed`, `acme` and `mate`. In many cases lazygit will be able to guess the right preset from your $(git config core.editor), or an environment variable such as $VISUAL or $EDITOR.
`nvim-remote` is an experimental preset for when you have invoked lazygit from within a neovim process, allowing lazygit to open the file from within the parent process rather than spawning a new one.

View file

@ -863,7 +863,7 @@ os:
editPreset: 'vscode'
```
Supported presets are `vim`, `nvim`, `nvim-remote`, `lvim`, `emacs`, `nano`, `micro`, `vscode`, `sublime`, `bbedit`, `kakoune`, `helix`, `xcode`, `zed` and `acme`. In many cases lazygit will be able to guess the right preset from your $(git config core.editor), or an environment variable such as $VISUAL or $EDITOR.
Supported presets are `vim`, `nvim`, `nvim-remote`, `lvim`, `emacs`, `nano`, `micro`, `vscode`, `sublime`, `bbedit`, `kakoune`, `helix`, `xcode`, `zed`, `acme` and `mate`. In many cases lazygit will be able to guess the right preset from your $(git config core.editor), or an environment variable such as $VISUAL or $EDITOR.
`nvim-remote` is an experimental preset for when you have invoked lazygit from within a neovim process, allowing lazygit to open the file from within the parent process rather than spawning a new one.

View file

@ -151,6 +151,13 @@ func getPreset(shell string, osConfig *OSConfig, guessDefaultEditor func() strin
openDirInEditorTemplate: "B {{dir}}",
suspend: returnBool(false),
},
"mate": {
editTemplate: "mate -- {{filename}}",
editAtLineTemplate: "mate --line {{line}} -- {{filename}}",
editAtLineAndWaitTemplate: "mate --wait --line {{line}} -- {{filename}}",
openDirInEditorTemplate: "mate -- {{dir}}",
suspend: returnBool(false),
},
}
// Some of our presets have a different name than the editor they are using.

View file

@ -641,7 +641,7 @@ type OSConfig struct {
OpenDirInEditor string `yaml:"openDirInEditor,omitempty"`
// A built-in preset that sets all of the above settings. Supported presets are defined in the getPreset function in editor_presets.go.
EditPreset string `yaml:"editPreset,omitempty" jsonschema:"example=vim,example=nvim,example=emacs,example=nano,example=vscode,example=sublime,example=kakoune,example=helix,example=xcode,example=zed,example=acme"`
EditPreset string `yaml:"editPreset,omitempty" jsonschema:"example=vim,example=nvim,example=emacs,example=nano,example=vscode,example=sublime,example=kakoune,example=helix,example=xcode,example=zed,example=acme,example=mate"`
// Command for opening a file, as if the file is double-clicked. Should contain "{{filename}}", but doesn't support "{{line}}".
Open string `yaml:"open,omitempty"`

View file

@ -1720,7 +1720,8 @@
"helix",
"xcode",
"zed",
"acme"
"acme",
"mate"
]
},
"open": {

View file

@ -1699,7 +1699,8 @@
"helix",
"xcode",
"zed",
"acme"
"acme",
"mate"
]
},
"open": {