Last active
December 10, 2017 14:46
-
-
Save davebrny/51fe9b24b17db5960700a3f1947b8c82 to your computer and use it in GitHub Desktop.
(autohotkey) - get the file that is open/focused in sublime text
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sublime_file() { | |
winGetTitle, sublime_title, ahk_exe sublime_text.exe | |
splitPath, sublime_title, , file_dir, file_ext, name_no_ext | |
split := strSplit(file_ext, a_space) ; remove project name or • from an unsaved file | |
return file_dir "\" name_no_ext "." split[1] | |
} | |
/* | |
description = get the file that is open/focused in sublime text | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment