diff --git a/ftplugin/html_snip_helper.vim b/ftplugin/html_snip_helper.vim
new file mode 100644
index 0000000..dd2a8dd
--- /dev/null
+++ b/ftplugin/html_snip_helper.vim
@@ -0,0 +1,10 @@
+" Helper function for (x)html snippets
+if exists('s:did_snip_helper') || &cp
+ finish
+endif
+let s:did_snip_helper = 1
+
+" Automatically closes tag if in xhtml
+fun! Close()
+ return stridx(&ft, 'xhtml') == -1 ? '' : ' /'
+endf