https://github.com/valentinocossar/sublime
Same as the official Sublime plugin for Oh My Zsh, but this opens files in the current Sublime window, if there is one already open.
https://github.com/valentinocossar/sublime
oh-my-zsh oh-my-zsh-plugin zsh
Last synced: about 18 hours ago
JSON representation
Same as the official Sublime plugin for Oh My Zsh, but this opens files in the current Sublime window, if there is one already open.
- Host: GitHub
- URL: https://github.com/valentinocossar/sublime
- Owner: valentinocossar
- Created: 2017-02-24T22:17:37.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-01T00:36:09.000Z (almost 8 years ago)
- Last Synced: 2024-04-16T03:06:30.350Z (over 1 year ago)
- Topics: oh-my-zsh, oh-my-zsh-plugin, zsh
- Language: Shell
- Homepage:
- Size: 3.91 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-zsh-plugins - sublime - Same as the official [Sublime](https://www.sublimetext.com/) plugin for [Oh My Zsh](https://ohmyz.sh/), but this opens files in the current Sublime window, if there is one already open. (Plugins / ZSH on Windows)
- fucking-awesome-zsh-plugins - sublime - Same as the official đ [Sublime](www.sublimetext.com/) plugin for đ [Oh My Zsh](ohmyz.sh/), but this opens files in the current Sublime window, if there is one already open. (Plugins / ZSH on Windows)
- awesome-zsh-plugins - sublime - Same as the official Sublime plugin for Oh My Zsh, but this opens files in the current Sublime window, if there is one already open. (Plugins / Zinit (nÊe zplugin))
README
## sublime
Plugin for Sublime Text, a cross platform text and code editor, available for Linux, Mac OS X, and Windows.
### Requirements
* [Sublime Text](http://www.sublimetext.com/)
### Installation
#### Manual
1. Clone this repository somewhere on your machine. This guide will assume `~/.zsh/sublime`.
```sh
git clone https://github.com/valentinocossar/sublime.git ~/.zsh/sublime
```
2. Add the following to your `.zshrc`:
```sh
source ~/.zsh/sublime/sublime.plugin.zsh
```
3. Start a new terminal session.
#### Oh My Zsh
1. Clone this repository into `$ZSH_CUSTOM/plugins` (by default `~/.oh-my-zsh/custom/plugins`)
```sh
git clone https://github.com/valentinocossar/sublime.git $ZSH_CUSTOM/plugins/sublime
```
2. Add the plugin to the list of plugins for Oh My Zsh to load:
```sh
plugins=(sublime)
```
3. Start a new terminal session.
### Usage
* If `st` command is called without an argument, launch Sublime Text.
* If `st` is passed a directory, `cd` to it and open it in Sublime Text (in the current window, if there is one open, it is equivalent to `subl -a`).
* If `st` is passed a file, open it in Sublime Text (in the current window, if there is one open, it is equivalent to `subl -a`).
* If `stt` command is called, opening the current folder in Sublime Text (in the current window, if there is one open, it is equivalent to `subl -a .` or `st .`).
* If `sst` command is called, it is like `sudo st`, opening the file or folder in Sublime Text (in the current window, if there is one open, it is equivalent to `sudo subl -a`). Useful for editing system protected files.
* If `stp` command is called, it find a `.sublime-project` file by traversing up the directory structure. If there is no `.sublime-project` file, but if the current folder is a Git repo, opens up the root directory of the repo. If the current folder is not a Git repo, then opens up the current directory (in the current window, if there is one open).