diff --git a/README.md b/README.md index 40bada3..a9a7607 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ Options: -d, --disable-tui Disable tui --editor - Text editor used to open selected line [default: vim] [possible values: github, emacs, intellij, less, neovim, nano, vim, vs-code] + Text editor used to open selected line [default: vim] [possible values: github, emacs, intellij, less, neovim, nano, vim, vscode] -., --hidden Search hidden files and directory --hide-help diff --git a/src/models/editor.rs b/src/models/editor.rs index ce91d87..5c8fe92 100644 --- a/src/models/editor.rs +++ b/src/models/editor.rs @@ -28,7 +28,7 @@ pub enum Editor { Nano, #[default] Vim, - VSCode, + Vscode, } pub struct EditorCommand { @@ -68,7 +68,7 @@ impl EditorCommand { Editor::Less => "less", Editor::Nano => "nano", Editor::Neovim => "nvim", - Editor::VSCode => "code", + Editor::Vscode => "code", Editor::Vim => "vim", _ => "", } @@ -85,7 +85,7 @@ impl EditorCommand { Editor::Less | Editor::Nano | Editor::Neovim | Editor::Vim => { Ok(format!("{} +{line_no} {file_path}", self.command())) } - Editor::VSCode => Ok(format!("{} -g {file_path}:{line_no}", self.command())), + Editor::Vscode => Ok(format!("{} -g {file_path}:{line_no}", self.command())), Editor::Github => Ok(format!( "{} https://github.com/{}/{}/blob/{}/{}#L{line_no}", self.config.url_open_command,