Skip to content

Commit

Permalink
Remove need for editing ColdFusion.sublime-settings
Browse files Browse the repository at this point in the history
  • Loading branch information
bbluemel authored and atomi committed Jun 25, 2012
1 parent be489d7 commit f0e0548
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions coldfusiontagcompletions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@


class ColdFusionTagComplete(sublime_plugin.EventListener):
valid_scopes_tags = ["meta.tag.inline.cfml", "meta.tag.block.other.cfml", "meta.tag.block.function.cfml", "meta.tag.block.flow-control.cfml", "meta.tag.block.exceptions.cfml"]
completions = {
'cfabort': {
'completions': [
Expand Down Expand Up @@ -4549,12 +4550,19 @@ class ColdFusionTagComplete(sublime_plugin.EventListener):


}
def on_modified(self, view):
sel = view.sel()[0].a
if view.substr(sel - 1) == " ":
if any(s in view.scope_name(sel) for s in self.valid_scopes_tags):
sublime.set_timeout(lambda:
view.run_command("auto_complete", { 'disable_auto_insert': True, 'next_completion_if_showing': False }), 50
)


def on_query_completions(self, view, prefix, locations):
sel = view.sel()[0].a
completions = []
valid_scopes_tags = ["meta.tag.inline.cfml", "meta.tag.block.other.cfml", "meta.tag.block.function.cfml", "meta.tag.block.flow-control.cfml", "meta.tag.block.exceptions.cfml"]
if any(s in view.scope_name(sel) for s in valid_scopes_tags):
if any(s in view.scope_name(sel) for s in self.valid_scopes_tags):
scopestart = view.extract_scope(sel).a
if scopestart == sel:
scopestart = view.extract_scope(sel - 1).a
Expand Down

0 comments on commit f0e0548

Please sign in to comment.