1246a4931b8eb307ab21768287b7818d0689f4e1
[dotfiles.git] / .vim / mysnippets / html.snippets
1 # snippet `<[a-z]+[0-9]*` "HTML tag expand" r
2 # <`!p snip.rv = match.group()[1:]`>$0</`!p snip.rv = match.group()[1:]`>
3 # endsnippet
4
5 snippet html "html template" w
6 <!DOCTYPE html>
7 <html>
8         <head>
9                 <meta charset="utf-8">
10                 <title></title>
11         </head>
12
13         <body>
14
15         </body>
16 </html>
17 endsnippet
18
19 snippet `<(.+)` "tag" rw
20 `!p snip.rv = "<{0}>".format(match.group(1))`$1`!p snip.rv = "</{0}>".format(match.group(1))` 
21 endsnippet
22
23 snippet img "img tag" w
24 <img src="$0" />
25 endsnippet
26
27 snippet '(h[0-9])' "h tag" rw
28 `!p
29 snip.rv = "<{0}></{0}>".format(match.group(1))
30 `
31 endsnippet
32
33 snippet bigcode "bigcode block" w
34 <pre><code>
35 $0
36 </code></pre>
37 endsnippet
38
39 snippet tag "html safe tag" w
40 &lt;$1&gt;$0&lt;/$1&gt;
41 endsnippet
42