diff --git a/plugins/vscode/README.md b/plugins/vscode/README.md index 8ee45525a..74b5a45aa 100644 --- a/plugins/vscode/README.md +++ b/plugins/vscode/README.md @@ -8,6 +8,21 @@ To start using it, add the `vscode` plugin to your `plugins` array in `~/.zshrc` plugins=(... vscode) ``` +If you are using [Visual Studio Code Insiders](https://code.visualstudio.com/insiders/), +add the following line in the oh-my-zsh settings section (between the `ZSH_THEME` and +the `plugins=()` line). This will make the plugin use the Insiders version instead. + +```zsh +ZSH_THEME=... + +# Add this line to use code-insiders instead of code +VSCODE=code-insiders + +plugins=(... vscode) + +source $ZSH/oh-my-zsh.sh +``` + ## Common aliases | Alias | Command | Description | diff --git a/plugins/vscode/vscode.plugin.zsh b/plugins/vscode/vscode.plugin.zsh index 902c23ecf..4c15df2b0 100644 --- a/plugins/vscode/vscode.plugin.zsh +++ b/plugins/vscode/vscode.plugin.zsh @@ -1,19 +1,22 @@ # VScode zsh plugin # author: https://github.com/MarsiBarsi -alias vsc='code .' -alias vsca='code --add' -alias vscd='code --diff' -alias vscg='code --goto' -alias vscn='code --new-window' -alias vscr='code --reuse-window' -alias vscw='code --wait' -alias vscu='code --user-data-dir' +# Use main Visual Studio Code version by default +: ${VSCODE:=code} -alias vsced='code --extensions-dir' -alias vscie='code --install-extension' -alias vscue='code --uninstall-extension' +alias vsc="$VSCODE ." +alias vsca="$VSCODE --add" +alias vscd="$VSCODE --diff" +alias vscg="$VSCODE --goto" +alias vscn="$VSCODE --new-window" +alias vscr="$VSCODE --reuse-window" +alias vscw="$VSCODE --wait" +alias vscu="$VSCODE --user-data-dir" -alias vscv='code --verbose' -alias vscl='code --log' -alias vscde='code --disable-extensions' +alias vsced="$VSCODE --extensions-dir" +alias vscie="$VSCODE --install-extension" +alias vscue="$VSCODE --uninstall-extension" + +alias vscv="$VSCODE --verbose" +alias vscl="$VSCODE --log" +alias vscde="$VSCODE --disable-extensions"