diff --git a/autofilename.py b/autofilename.py index 004b929..a94d129 100644 --- a/autofilename.py +++ b/autofilename.py @@ -122,6 +122,9 @@ class FileNameComplete(sublime_plugin.EventListener): valid_scopes = self.get_setting('afn_valid_scopes',view) sel = view.sel()[0].a completions = [] + + if "string.regexp.js" in view.scope_name(sel): + return [] if not any(s in view.scope_name(sel) for s in valid_scopes): return [] @@ -154,4 +157,4 @@ class FileNameComplete(sublime_plugin.EventListener): return completions except OSError: print "AutoFileName: could not find " + this_dir - return \ No newline at end of file + return