Skip to content

Commit

Permalink
Add vim_exe configuration variable
Browse files Browse the repository at this point in the history
  • Loading branch information
bbugyi200 committed Dec 27, 2024
1 parent c27a110 commit 27e0897
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/zorg/app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ class EditConfig(Config):

# ----- CONFIG
file_group_map: FileGroupMapType = {}
vim_exe: str = "vim"


class FileRenameConfig(Config):
Expand Down
1 change: 1 addition & 0 deletions src/zorg/app/runners/_run_edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def run_edit(cfg: EditConfig) -> int:
paths=zo_paths,
verbose=cfg.verbose,
vim_commands=cfg.vim_commands,
vim_exe=cfg.vim_exe,
zettel_dir=cfg.zettel_dir,
),
],
Expand Down
1 change: 1 addition & 0 deletions src/zorg/domain/messages/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class EditCommand(Command):
paths: list[Path]
keep_alive_file: Path
vim_commands: list[str]
vim_exe: str
verbose: int = 0


Expand Down
1 change: 1 addition & 0 deletions src/zorg/service/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def edit_files(cmd: commands.EditCommand, session: SQLSession) -> None:
vimala.vim(
*cmd.paths,
commands=_process_vim_commands(cmd.zettel_dir, cmd.vim_commands),
vim_exe=cmd.vim_exe,
).unwrap()
session.add_message( # pylint: disable=unreachable
events.EditorClosedEvent(edit_cmd=cmd)
Expand Down

0 comments on commit 27e0897

Please sign in to comment.