Unverified Commit 7ff77120 authored by Babak K. Shandiz's avatar Babak K. Shandiz Committed by GitHub
Browse files

vscode: use insiders build if stable not found (#8568)

* 🔨 Add calling VS Code Insiders

* ️ Update README.md
parent 64a7f6b3
# VS code # VS Code
This plugin makes interaction between the command line and the code editor easier. This plugin makes interaction between the command line and the VS Code editor easier.
To start using it, add the `vscode` plugin to your `plugins` array in `~/.zshrc`: To start using it, add the `vscode` plugin to your `plugins` array in `~/.zshrc`:
...@@ -8,9 +8,11 @@ To start using it, add the `vscode` plugin to your `plugins` array in `~/.zshrc` ...@@ -8,9 +8,11 @@ To start using it, add the `vscode` plugin to your `plugins` array in `~/.zshrc`
plugins=(... vscode) plugins=(... vscode)
``` ```
If you are using [Visual Studio Code Insiders](https://code.visualstudio.com/insiders/), ## VS Code 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. 🍏 **If you are only using [VS Code Insiders](https://code.visualstudio.com/insiders/), the plugin will automatically bind to your Insiders installation.**
But, if you have both Stable and Insiders versions and want to configure the plugin to just use the Insiders version, 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
ZSH_THEME=... ZSH_THEME=...
......
# VScode zsh plugin # VScode zsh plugin
# author: https://github.com/MarsiBarsi # Authors:
# https://github.com/MarsiBarsi (original author)
# https://github.com/babakks
# Use main Visual Studio Code version by default # Use the stable VS Code release, unless the Insiders version is the only
: ${VSCODE:=code} # available installation
if ! which code > /dev/null && which code-insiders > /dev/null; then
: ${VSCODE:=code-insiders}
else
: ${VSCODE:=code}
fi
# Define aliases
alias vsc="$VSCODE ." alias vsc="$VSCODE ."
alias vsca="$VSCODE --add" alias vsca="$VSCODE --add"
alias vscd="$VSCODE --diff" alias vscd="$VSCODE --diff"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment