diff options
Diffstat (limited to 'helix-term/src')
-rw-r--r-- | helix-term/src/application.rs | 3 | ||||
-rw-r--r-- | helix-term/src/args.rs | 2 | ||||
-rw-r--r-- | helix-term/src/main.rs | 1 |
3 files changed, 6 insertions, 0 deletions
diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs index 3eee3396..e885bc49 100644 --- a/helix-term/src/application.rs +++ b/helix-term/src/application.rs @@ -113,6 +113,9 @@ impl Application { editor.open(path, Action::VerticalSplit)?; // Unset path to prevent accidentally saving to the original tutor file. doc_mut!(editor).set_path(None)?; + } else if args.edit_config { + let path = conf_dir.join("config.toml"); + editor.open(path, Action::VerticalSplit)?; } else if !args.files.is_empty() { let first = &args.files[0].0; // we know it's not empty if first.is_dir() { diff --git a/helix-term/src/args.rs b/helix-term/src/args.rs index 4f386aea..11bad08c 100644 --- a/helix-term/src/args.rs +++ b/helix-term/src/args.rs @@ -11,6 +11,7 @@ pub struct Args { pub load_tutor: bool, pub verbosity: u64, pub files: Vec<(PathBuf, Position)>, + pub edit_config: bool, } impl Args { @@ -26,6 +27,7 @@ impl Args { "--version" => args.display_version = true, "--help" => args.display_help = true, "--tutor" => args.load_tutor = true, + "--edit-config" => args.edit_config = true, "--health" => { args.health = true; args.health_arg = argv.next_if(|opt| !opt.starts_with('-')); diff --git a/helix-term/src/main.rs b/helix-term/src/main.rs index cde26c2e..607f1f59 100644 --- a/helix-term/src/main.rs +++ b/helix-term/src/main.rs @@ -60,6 +60,7 @@ ARGS: FLAGS: -h, --help Prints help information + --edit-config Opens the helix config file --tutor Loads the tutorial --health [LANG] Checks for potential errors in editor setup If given, checks for config errors in language LANG |