Skip to content

Latest commit

 

History

History
57 lines (32 loc) · 1.94 KB

README.md

File metadata and controls

57 lines (32 loc) · 1.94 KB

sublime

Plugin for Sublime Text, a cross platform text and code editor, available for Linux, Mac OS X, and Windows.

Requirements

Installation

Manual

  1. Clone this repository somewhere on your machine. This guide will assume ~/.zsh/sublime.
git clone https://github.com/valentinocossar/sublime.git ~/.zsh/sublime
  1. Add the following to your .zshrc:
source ~/.zsh/sublime/sublime.plugin.zsh
  1. Start a new terminal session.

Oh My Zsh

  1. Clone this repository into $ZSH_CUSTOM/plugins (by default ~/.oh-my-zsh/custom/plugins)
git clone https://github.com/valentinocossar/sublime.git $ZSH_CUSTOM/plugins/sublime
  1. Add the plugin to the list of plugins for Oh My Zsh to load:
plugins=(sublime)
  1. 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).