I can modify the HTML ‘on_query_completions’ behaviour so that I will be able to provide a completions list of attributes - appropriate to the current tag, with code such as the following.
[code] if not view.match_selector(locations[0],
“text.html - source”):
return ]
pt = locations[0] - len(prefix) - 1
ch = view.substr(sublime.Region(pt, pt + 1))
if ch != '<':
print view.scope_name(pt + 1)
if not view.match_selector(locations[0],
"text.html.basic meta.tag.inline.any.html"):
print 'not found'
return ]
return (("helloAttr\tAttributes", "attr=\"$1\"")],
sublime.INHIBIT_WORD_COMPLETIONS | sublime.INHIBIT_EXPLICIT_COMPLETIONS)[/code]
But there is a default list of items that appear in the completions list - such as accesskey, bgcolor, etc. (screenshot). These seem to be built-in to ST. Is it possible to remove or suppress them? I realise that ‘accesskey’ is appropriate, but most of the others aren’t. Actually, perhaps they are from ZenCoding(?).
Andy.