mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-08 04:34:00 +02:00
Merge 1050ba594b into 291e96dcd0
This commit is contained in:
commit
97b318b880
3 changed files with 51 additions and 0 deletions
17
plugins/atom/README.md
Normal file
17
plugins/atom/README.md
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
## atom
|
||||||
|
|
||||||
|
Plugin for Atom, a cross platform text and code editor, available for Linux, Mac OS X, and Windows.
|
||||||
|
|
||||||
|
### Requirements
|
||||||
|
|
||||||
|
* [Atom](https://atom.io/)
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
|
||||||
|
* If `at` command is called without an argument, launch Atom
|
||||||
|
|
||||||
|
* If `at` is passed a directory, `cd` to it and open it in Atom
|
||||||
|
|
||||||
|
* If `at` is passed a file, open it in Atom
|
||||||
|
|
||||||
|
* if `att` command is called, it is equivalent to `at .`, opening the current folder in Atom
|
||||||
17
plugins/vscode/README.md
Normal file
17
plugins/vscode/README.md
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
## Visual Studio Code
|
||||||
|
|
||||||
|
Plugin for Visual Studio Code, a text editor for Mac OS X, Windows, and Linux
|
||||||
|
|
||||||
|
### Requirements
|
||||||
|
|
||||||
|
* [Visual Studio Code](https://code.visualstudio.com)
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
|
||||||
|
* If the `code` command is called without an argument, launch VS Code
|
||||||
|
|
||||||
|
* If `code` is passed a directory, cd to it and open it in VS Code
|
||||||
|
|
||||||
|
* If `code` is passed a file, open it in VS Code
|
||||||
|
|
||||||
|
*NOTE: `vscode` can be used as an alias in place of `code`*
|
||||||
17
plugins/vscode/vscode.plugin.zsh
Normal file
17
plugins/vscode/vscode.plugin.zsh
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
alias vscode='code'
|
||||||
|
|
||||||
|
#
|
||||||
|
# If the code command is called without an argument, launch VS Code
|
||||||
|
# If code is passed a directory, cd to it and open it in VS Code
|
||||||
|
# If code is passed a file, open it in VS code
|
||||||
|
#
|
||||||
|
function code {
|
||||||
|
if [[ $# = 0 ]]
|
||||||
|
then
|
||||||
|
open -a "Visual Studio Code"
|
||||||
|
else
|
||||||
|
local argPath="$1"
|
||||||
|
[[ $1 = /* ]] && argPath="$1" || argPath="$PWD/${1#./}"
|
||||||
|
open -a "Visual Studio Code" "$argPath"
|
||||||
|
fi
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue