mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 01:04:59 +00:00
Add support for VI editing mode in the terminal.
This commit is contained in:
parent
eae9a1e065
commit
196c1314eb
2 changed files with 8 additions and 0 deletions
|
@ -21,6 +21,11 @@ def get_parser(default_config_files, git_root):
|
|||
)
|
||||
group = parser.add_argument_group("Main")
|
||||
group.add_argument(
|
||||
"--vim",
|
||||
action="store_true",
|
||||
help="Use VI editing mode in the terminal (default: False)",
|
||||
default=False,
|
||||
)
|
||||
"files",
|
||||
metavar="FILE",
|
||||
nargs="*",
|
||||
|
|
|
@ -258,8 +258,11 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
|||
tool_error_color=args.tool_error_color,
|
||||
dry_run=args.dry_run,
|
||||
encoding=args.encoding,
|
||||
editingmode=editing_mode,
|
||||
)
|
||||
|
||||
editing_mode = EditingMode.VI if args.vim else EditingMode.EMACS
|
||||
|
||||
fnames = [str(Path(fn).resolve()) for fn in args.files]
|
||||
if len(args.files) > 1:
|
||||
good = True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue