README.md 1.36 KB
Newer Older
1
# sublime
wyldphyre's avatar
wyldphyre committed
2

3
4
Plugin for [Sublime Text](https://www.sublimetext.com/), a cross platform text and code editor,
available for Linux, macOS, and Windows.
wyldphyre's avatar
wyldphyre committed
5

6
To use the plugin, add `sublime` to the plugins array of your zshrc file:
wyldphyre's avatar
wyldphyre committed
7

8
9
10
```zsh
plugins=(... sublime)
```
wyldphyre's avatar
wyldphyre committed
11

12
Sublime Text has to be installed to use the plugin.
wyldphyre's avatar
wyldphyre committed
13

14
## Usage
wyldphyre's avatar
wyldphyre committed
15

16
The plugin defines several aliases, such as:
wyldphyre's avatar
wyldphyre committed
17

18
- `st`: opens Sublime Text. If passed a file or directory, Sublime Text will open it.
wyldphyre's avatar
wyldphyre committed
19

20
- `stt`: open Sublime Text on the current directory.
21

22
23
- `sst`: if `sudo` is available, `sst` will open Sublime Text with root permissions, so that
  you can modify any file or directory that you pass it. Useful to edit system files.
24

25
There are also a few functions available:
26

27
28
- `find_project` (or `stp` alias): if called, the function will search for a `.sublime-project` file
  on the current directory or its parents, until it finds none.
29

30
31
32
33
34
35
36
37
  If there is no `.sublime-project` file but the current folder is in a Git repository, it will open
  Sublime Text on the root directory of the repository.

  If there is no Git repository, it will then open Sublime Text on the current directory.

- `create_project` (or `stn` alias): if called without an argument, create a stub `.sublime-project`
  file in the current working directory, if one does not already exist. If passed a directory, create
  a stub `.sublime-project` file in it.