blob: 46de0b9485f08e8cf7ccd45a5622bed383e51b7e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
hook global WinSetOption filetype=html %{
hook -group snippet-html global InsertChar . %{
try %{
evaluate-commands expand-snippet-nl \
hd1 \
<lt>h1<gt><lt>/h1<gt><esc>5hi
} catch %{
evaluate-commands expand-snippet-nl \
hd2 \
<lt>h2<gt><lt>/h2<gt><esc>5hi
} catch %{
evaluate-commands expand-snippet-nl \
hd3 \
<lt>h3<gt><lt>/h3<gt><esc>5hi
} catch %{
evaluate-commands expand-snippet-nl \
hd4 \
<lt>h4<gt><lt>/h4<gt><esc>5hi
} catch %{}
}
hook -once -always window WinSetOption filetype=.* %{
remove-hooks global snippet-html
}
}
|