From 6e027f42dace96fd7074cf572eef0faebd89a2b5 Mon Sep 17 00:00:00 2001 From: Christian Rackerseder Date: Wed, 3 May 2023 13:30:51 +0200 Subject: [PATCH 1/3] Include "nvim" in supported edit presets --- docs/Config.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Config.md b/docs/Config.md index 9c5aa20b8..ee6fcc385 100644 --- a/docs/Config.md +++ b/docs/Config.md @@ -285,7 +285,7 @@ os: editPreset: 'vscode' ``` -Supported presets are `vim`, `emacs`, `nano`, `vscode`, `sublime`, `bbedit`, and +Supported presets are `vim`, `nvim`, `emacs`, `nano`, `vscode`, `sublime`, `bbedit`, and `xcode`. 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. From 1636931c2b11695846241933a4d7e8d61609e766 Mon Sep 17 00:00:00 2001 From: Christian Rackerseder Date: Thu, 4 May 2023 08:28:58 +0200 Subject: [PATCH 2/3] Include "kakoune" in supported edit presets --- docs/Config.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/Config.md b/docs/Config.md index ee6fcc385..e3890f9f6 100644 --- a/docs/Config.md +++ b/docs/Config.md @@ -285,9 +285,9 @@ os: editPreset: 'vscode' ``` -Supported presets are `vim`, `nvim`, `emacs`, `nano`, `vscode`, `sublime`, `bbedit`, and -`xcode`. 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`, `emacs`, `nano`, `vscode`, `sublime`, `bbedit`, +`kakoune` and `xcode`. 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. If for some reason you are not happy with the default commands from a preset, or there simply is no preset for your editor, you can customize the commands by From 3cac14c76e5c968c5c134306d905a98d300bf308 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Thu, 4 May 2023 16:53:13 +1000 Subject: [PATCH 3/3] add comment to encourage keeping code and docs in sync --- pkg/config/editor_presets.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/config/editor_presets.go b/pkg/config/editor_presets.go index d461112d0..76b9d5996 100644 --- a/pkg/config/editor_presets.go +++ b/pkg/config/editor_presets.go @@ -35,6 +35,7 @@ type editPreset struct { editInTerminal bool } +// IF YOU ADD A PRESET TO THIS FUNCTION YOU MUST UPDATE THE `Supported presets` SECTION OF docs/Config.md func getPreset(osConfig *OSConfig, guessDefaultEditor func() string) *editPreset { presets := map[string]*editPreset{ "vi": standardTerminalEditorPreset("vi"),