summaryrefslogtreecommitdiff
path: root/plugins/sublime
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/sublime')
-rw-r--r--plugins/sublime/README.md17
-rw-r--r--plugins/sublime/sublime.plugin.zsh2
2 files changed, 19 insertions, 0 deletions
diff --git a/plugins/sublime/README.md b/plugins/sublime/README.md
new file mode 100644
index 000000000..e38cf66dc
--- /dev/null
+++ b/plugins/sublime/README.md
@@ -0,0 +1,17 @@
+## 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/)
+
+### 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
+
+ * If `st` is passed a file, open it in Sublime Text
+
+ * if `stt` command is called, it is equivalent to `st .`, opening the current folder in Sublime Text \ No newline at end of file
diff --git a/plugins/sublime/sublime.plugin.zsh b/plugins/sublime/sublime.plugin.zsh
index 5acc75cc7..38a7596fd 100644
--- a/plugins/sublime/sublime.plugin.zsh
+++ b/plugins/sublime/sublime.plugin.zsh
@@ -12,6 +12,8 @@ if [[ $('uname') == 'Linux' ]]; then
for _sublime_path in $_sublime_linux_paths; do
if [[ -a $_sublime_path ]]; then
st_run() { $_sublime_path $@ >/dev/null 2>&1 &| }
+ st_run_sudo() {sudo $_sublime_path $@ >/dev/null 2>&1}
+ alias sst=st_run_sudo
alias st=st_run
break
fi