From 9b1acce0fef9007b05e8cbff90049e05747b28ba Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Wed, 24 Jun 2026 21:44:14 +0200 Subject: [PATCH] Remove the "Open config file" command OpenFile (`o`) is for opening a file as if it was double-clicked in Finder/Explorer; this is useful for binary files like PNGs, but never for text files. You want to edit them, and there's `e` for that. --- docs-master/keybindings/Keybindings_en.md | 1 - docs-master/keybindings/Keybindings_ja.md | 1 - docs-master/keybindings/Keybindings_ko.md | 1 - docs-master/keybindings/Keybindings_nl.md | 1 - docs-master/keybindings/Keybindings_pl.md | 1 - docs-master/keybindings/Keybindings_pt.md | 1 - docs-master/keybindings/Keybindings_ru.md | 1 - docs-master/keybindings/Keybindings_zh-CN.md | 1 - docs-master/keybindings/Keybindings_zh-TW.md | 1 - pkg/gui/controllers/status_controller.go | 10 ---------- pkg/i18n/english.go | 2 -- 11 files changed, 21 deletions(-) diff --git a/docs-master/keybindings/Keybindings_en.md b/docs-master/keybindings/Keybindings_en.md index 07d4d95a4..ed4304a4b 100644 --- a/docs-master/keybindings/Keybindings_en.md +++ b/docs-master/keybindings/Keybindings_en.md @@ -348,7 +348,6 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct | Key | Action | Info | |-----|--------|-------------| -| `` o `` | Open config file | Open file in default application. | | `` e `` | Edit config file | Open file in external editor. | | `` u `` | Check for update | | | `` `` | Switch to a recent repo | | diff --git a/docs-master/keybindings/Keybindings_ja.md b/docs-master/keybindings/Keybindings_ja.md index 5bf6797bd..adf2f1b38 100644 --- a/docs-master/keybindings/Keybindings_ja.md +++ b/docs-master/keybindings/Keybindings_ja.md @@ -179,7 +179,6 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct | Key | Action | Info | |-----|--------|-------------| -| `` o `` | 設定ファイルを開く | デフォルトのアプリケーションでファイルを開きます。 | | `` e `` | 設定ファイルを編集 | 外部エディタでファイルを開きます。 | | `` u `` | 更新を確認 | | | `` `` | 最近のリポジトリをチェックアウト | | diff --git a/docs-master/keybindings/Keybindings_ko.md b/docs-master/keybindings/Keybindings_ko.md index e80515daa..1881876ef 100644 --- a/docs-master/keybindings/Keybindings_ko.md +++ b/docs-master/keybindings/Keybindings_ko.md @@ -237,7 +237,6 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct | Key | Action | Info | |-----|--------|-------------| -| `` o `` | 설정 파일 열기 | Open file in default application. | | `` e `` | 설정 파일 수정 | Open file in external editor. | | `` u `` | 업데이트 확인 | | | `` `` | 최근에 사용한 저장소로 전환 | | diff --git a/docs-master/keybindings/Keybindings_nl.md b/docs-master/keybindings/Keybindings_nl.md index 76764eda5..f3dc4eb4a 100644 --- a/docs-master/keybindings/Keybindings_nl.md +++ b/docs-master/keybindings/Keybindings_nl.md @@ -348,7 +348,6 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct | Key | Action | Info | |-----|--------|-------------| -| `` o `` | Open config bestand | Open file in default application. | | `` e `` | Verander config bestand | Open file in external editor. | | `` u `` | Check voor updates | | | `` `` | Wissel naar een recente repo | | diff --git a/docs-master/keybindings/Keybindings_pl.md b/docs-master/keybindings/Keybindings_pl.md index aa510a813..110aa17be 100644 --- a/docs-master/keybindings/Keybindings_pl.md +++ b/docs-master/keybindings/Keybindings_pl.md @@ -327,7 +327,6 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct | Key | Action | Info | |-----|--------|-------------| -| `` o `` | Otwórz plik konfiguracyjny | Otwórz plik w domyślnej aplikacji. | | `` e `` | Edytuj plik konfiguracyjny | Otwórz plik w zewnętrznym edytorze. | | `` u `` | Sprawdź aktualizacje | | | `` `` | Przełącz na ostatnie repozytorium | | diff --git a/docs-master/keybindings/Keybindings_pt.md b/docs-master/keybindings/Keybindings_pt.md index efe0d24ed..e69061b30 100644 --- a/docs-master/keybindings/Keybindings_pt.md +++ b/docs-master/keybindings/Keybindings_pt.md @@ -357,7 +357,6 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct | Key | Action | Info | |-----|--------|-------------| -| `` o `` | Abrir o ficheiro de config | Abrir arquivo no aplicativo padrão. | | `` e `` | Editar arquivo de configuração | Abrir arquivo no editor externo. | | `` u `` | Verificar atualização | | | `` `` | Mudar para um repositório recente | | diff --git a/docs-master/keybindings/Keybindings_ru.md b/docs-master/keybindings/Keybindings_ru.md index 1f952ed6b..70c63c4b5 100644 --- a/docs-master/keybindings/Keybindings_ru.md +++ b/docs-master/keybindings/Keybindings_ru.md @@ -314,7 +314,6 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct | Key | Action | Info | |-----|--------|-------------| -| `` o `` | Открыть файл конфигурации | Open file in default application. | | `` e `` | Редактировать файл конфигурации | Open file in external editor. | | `` u `` | Проверить обновления | | | `` `` | Переключиться на последний репозиторий | | diff --git a/docs-master/keybindings/Keybindings_zh-CN.md b/docs-master/keybindings/Keybindings_zh-CN.md index e1dbbe9c6..22fedf9e2 100644 --- a/docs-master/keybindings/Keybindings_zh-CN.md +++ b/docs-master/keybindings/Keybindings_zh-CN.md @@ -340,7 +340,6 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct | Key | Action | Info | |-----|--------|-------------| -| `` o `` | 打开配置文件 | 使用默认程序打开该文件 | | `` e `` | 编辑配置文件 | 使用外部编辑器打开文件 | | `` u `` | 检查更新 | | | `` `` | 切换到最近的仓库 | | diff --git a/docs-master/keybindings/Keybindings_zh-TW.md b/docs-master/keybindings/Keybindings_zh-TW.md index bf13db65d..1d9076b60 100644 --- a/docs-master/keybindings/Keybindings_zh-TW.md +++ b/docs-master/keybindings/Keybindings_zh-TW.md @@ -369,7 +369,6 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct | Key | Action | Info | |-----|--------|-------------| -| `` o `` | 開啟設定檔案 | 使用預設軟體開啟 | | `` e `` | 編輯設定檔案 | 使用外部編輯器開啟 | | `` u `` | 檢查更新 | | | `` `` | 切換到最近使用的版本庫 | | diff --git a/pkg/gui/controllers/status_controller.go b/pkg/gui/controllers/status_controller.go index f29ee97f0..cc2a725bd 100644 --- a/pkg/gui/controllers/status_controller.go +++ b/pkg/gui/controllers/status_controller.go @@ -33,12 +33,6 @@ func NewStatusController( func (self *StatusController) GetKeybindings(opts types.KeybindingsOpts) []*types.Binding { bindings := []*types.Binding{ - { - Keys: opts.GetKeys(opts.Config.Universal.OpenFile), - Handler: self.openConfig, - Description: self.c.Tr.OpenConfig, - Tooltip: self.c.Tr.OpenFileTooltip, - }, { Keys: opts.GetKeys(opts.Config.Universal.Edit), Handler: self.editConfig, @@ -172,10 +166,6 @@ func (self *StatusController) askForConfigFile(action func(file string) error) e } } -func (self *StatusController) openConfig() error { - return self.askForConfigFile(self.c.Helpers().Files.OpenFile) -} - func (self *StatusController) editConfig() error { return self.askForConfigFile(func(file string) error { return self.c.Helpers().Files.EditFiles([]string{file}) diff --git a/pkg/i18n/english.go b/pkg/i18n/english.go index 20d0d5ff6..8dd40016a 100644 --- a/pkg/i18n/english.go +++ b/pkg/i18n/english.go @@ -231,7 +231,6 @@ type TranslationSet struct { StashChanges string RenameStash string RenameStashPrompt string - OpenConfig string EditConfig string ForcePush string ForcePushPrompt string @@ -1357,7 +1356,6 @@ func EnglishTranslationSet() *TranslationSet { StashChanges: "Stash changes", RenameStash: "Rename stash", RenameStashPrompt: "Rename stash: {{.stashName}}", - OpenConfig: "Open config file", EditConfig: "Edit config file", ForcePush: "Force push", ForcePushPrompt: "Your branch has diverged from the remote branch. Press {{.cancelKey}} to cancel, or {{.confirmKey}} to force push.",