hook global WinSetOption filetype=html %{ hook -group snippet-html global InsertChar . %{ try %{ evaluate-commands expand-snippet-nl \ brk \ br/ } catch %{ evaluate-commands expand-snippet-nl \ hr \ hr } catch %{} } hook -once -always window WinSetOption filetype=.* %{ remove-hooks global snippet-html } }