Skip to content

Commit

Permalink
🚚 Change vs-code to vscode
Browse files Browse the repository at this point in the history
  • Loading branch information
harehare committed Nov 19, 2024
1 parent 280ba9a commit 7dbe5a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Options:
-d, --disable-tui
Disable tui
--editor <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
Expand Down
6 changes: 3 additions & 3 deletions src/models/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub enum Editor {
Nano,
#[default]
Vim,
VSCode,
Vscode,
}

pub struct EditorCommand {
Expand Down Expand Up @@ -68,7 +68,7 @@ impl EditorCommand {
Editor::Less => "less",
Editor::Nano => "nano",
Editor::Neovim => "nvim",
Editor::VSCode => "code",
Editor::Vscode => "code",
Editor::Vim => "vim",
_ => "",
}
Expand All @@ -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,
Expand Down

0 comments on commit 7dbe5a7

Please sign in to comment.