An Oh My Zsh plugin to open files in Visual Studio Code.
- Clone this repository somewhere on your machine. This guide will assume
~/.zsh/vscode.
git clone https://github.com/valentinocossar/vscode.git ~/.zsh/vscode- Add the following to your
.zshrc:
source ~/.zsh/vscode/vscode.plugin.zsh- Start a new terminal session.
- Clone this repository into
$ZSH_CUSTOM/plugins(by default~/.oh-my-zsh/custom/plugins)
git clone https://github.com/valentinocossar/vscode.git $ZSH_CUSTOM/plugins/vscode- Add the plugin to the list of plugins for Oh My Zsh to load:
plugins=(vscode)- Start a new terminal session.
-
If
vscommand is called without an argument, launch Visual Studio Code. -
If
vsis passed a directory,cdto it and open it in Visual Studio Code. -
If
vsais passed a directory,cdto it and open it in the last active Visual Studio Code window. -
If
vsis passed a file, open it in Visual Studio Code. -
If
vsais passed a file, open it in the last active Visual Studio Code window. -
If
vstcommand is called, it is equivalent tovs ., opening the current folder in Visual Studio Code. -
If
vstacommand is called, it is equivalent tovs -a ., opening the current folder in the last active Visual Studio Code window. -
If
svscommand is called, it is likesudo vs, opening the file or folder in Visual Studio Code. Useful for editing system protected files. -
If
svsacommand is called, it is likesudo vs -a, opening the file or folder in the last active Visual Studio Code window. Useful for editing system protected files.