diff --git a/docs/changelog.rst b/docs/changelog.rst index 3ee5402da..da08fd36b 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -212,6 +212,8 @@ Detailed list of changes - choose-files kitten: Add a ``--mode=all`` to select either an existing file or directory (:iss:`10208`) +- Add support for editing files in sublime text and zed at specified line number (:pull:`10224`) + 0.47.4 [2026-06-15] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/kitty/utils.py b/kitty/utils.py index 81cb9935c..7f7756546 100644 --- a/kitty/utils.py +++ b/kitty/utils.py @@ -588,6 +588,8 @@ def get_editor(opts: Options | None = None, path_to_edit: str = '', line_number: if eq in ('code', 'code.exe'): path_to_edit += f':{line_number}' ans.append('--goto') + elif eq in ('subl', 'subl.exe', 'sublime_text', 'sublime_text.exe', 'zed', 'zed.exe', 'zeditor'): + path_to_edit += f':{line_number}' else: ans.append(f'+{line_number}') ans.append(path_to_edit)