Skip to content

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.

Notifications You must be signed in to change notification settings

valentinocossar/sublime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

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).

About

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.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages