From e8ac8b9b5f82369635d719408f8b4adc5d97bcf9 Mon Sep 17 00:00:00 2001 From: Jonathan Roemer Date: Fri, 1 May 2015 17:44:50 -0400 Subject: Added support for detecting Sublime Text 3 on Arch Linux --- plugins/sublime/sublime.plugin.zsh | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins/sublime') diff --git a/plugins/sublime/sublime.plugin.zsh b/plugins/sublime/sublime.plugin.zsh index 38a7596fd..4d9979960 100644 --- a/plugins/sublime/sublime.plugin.zsh +++ b/plugins/sublime/sublime.plugin.zsh @@ -5,6 +5,7 @@ if [[ $('uname') == 'Linux' ]]; then _sublime_linux_paths=( "$HOME/bin/sublime_text" "/opt/sublime_text/sublime_text" + "/opt/sublime_text_3/sublime_text" "/usr/bin/sublime_text" "/usr/local/bin/sublime_text" "/usr/bin/subl" -- cgit v1.2.3-70-g09d2 From 4c409b0de918e62f9354cbc604c6ae65da611caf Mon Sep 17 00:00:00 2001 From: Paul Melnikow Date: Mon, 29 Dec 2014 14:48:24 -0500 Subject: sublime: Make subl a function so it can be called from functions in other modules Without this change, whether a function can invoke 'subl' depends on the order in which modules are loaded. With this change, the order doesn't matter. zsh resolves aliases at parse time not run time, which means if you invoke an alias from a function, the alias must be defined before the function. See http://stackoverflow.com/a/25532276/893113 which refers to an explanation of this limitation. For code which may be used non-interactively, the recommend workaround is to use functions instead of aliases. --- plugins/sublime/sublime.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/sublime') diff --git a/plugins/sublime/sublime.plugin.zsh b/plugins/sublime/sublime.plugin.zsh index 4d9979960..3e338e4d3 100644 --- a/plugins/sublime/sublime.plugin.zsh +++ b/plugins/sublime/sublime.plugin.zsh @@ -34,7 +34,7 @@ elif [[ "$OSTYPE" = darwin* ]]; then for _sublime_path in $_sublime_darwin_paths; do if [[ -a $_sublime_path ]]; then - alias subl="'$_sublime_path'" + subl () { "$_sublime_path" $* } alias st=subl break fi -- cgit v1.2.3-70-g09d2 From c28b226af2dc0843ab0f05ea4abc54c4bdfd7012 Mon Sep 17 00:00:00 2001 From: CkEsc Date: Tue, 3 Mar 2015 23:03:44 +0300 Subject: Fix README.md for sst command --- plugins/sublime/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plugins/sublime') diff --git a/plugins/sublime/README.md b/plugins/sublime/README.md index e38cf66dc..e1e666f05 100644 --- a/plugins/sublime/README.md +++ b/plugins/sublime/README.md @@ -14,4 +14,6 @@ Plugin for Sublime Text, a cross platform text and code editor, available for Li * 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 + * If `stt` command is called, it is equivalent to `st .`, opening the current folder in Sublime Text + + * If `sst` command is called, it is like `sudo st`, opening the file or folder in Sublime Text. Useful for editing system protected files. \ No newline at end of file -- cgit v1.2.3-70-g09d2