global !p
def complete(t, opts):
if t:
opts = [m[len(t):] for m in opts if m.startswith(t)]
if len(opts) == 1:
return opts[0]
elif len(opts) == 0:
return "-error"
return '(' + '|'.join(opts) + ')'
endglobal
# html snippets
snippet class "HTML class tag"
class="$1"$0
endsnippet
snippet img "HTML img tag"
endsnippet
snippet span "HTML span tag" i
$0
endsnippet
snippet code "HTML code tab" i
$0
endsnippet
snippet section "HTML section tag"
$1 |
---|
$0 |