From 0f4ab5a2fba7c855d1e0bfbe8e9cc1ac80d9ce78 Mon Sep 17 00:00:00 2001 From: Michael Sanders Date: Mon, 23 Mar 2009 10:12:09 -0400 Subject: [PATCH] added html helper function for closing tags --- ftplugin/html_snip_helper.vim | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 ftplugin/html_snip_helper.vim 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