Skip to content

Commit

Permalink
strip whitespace please
Browse files Browse the repository at this point in the history
  • Loading branch information
atomi committed Jun 25, 2012
1 parent 1910d8a commit 0a53bb8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions coldfusiontagcompletions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
import sublime_plugin
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"]


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:
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 = []

if any(s in view.scope_name(sel) for s in self.valid_scopes_tags):
scopestart = view.extract_scope(sel).a
if scopestart == sel:
Expand All @@ -33,8 +33,8 @@ def get_class( kls ):
module = ".".join(parts[:-1])
m = __import__( module )
for comp in parts[1:]:
m = getattr(m, comp)
m = getattr(m, comp)
return m

cflib = get_class('taglib.cf10.tags')()

0 comments on commit 0a53bb8

Please sign in to comment.