hook global WinSetOption filetype=html %{
hook -group snippet-html global InsertChar . %{
try %{
evaluate-commands expand-snippet-nl \
hd1 \
h1/h15hi
} catch %{
evaluate-commands expand-snippet-nl \
hd2 \
h2/h25hi
} catch %{
evaluate-commands expand-snippet-nl \
hd3 \
h3/h35hi
} catch %{
evaluate-commands expand-snippet-nl \
hd4 \
h4/h45hi
} catch %{}
}
hook -once -always window WinSetOption filetype=.* %{
remove-hooks global snippet-html
}
}