aboutsummaryrefslogtreecommitdiff
path: root/files/.vim/ftplugin/html_snip_helper.vim
diff options
context:
space:
mode:
authorAnton Bobov <bobov_a@sibsac.ru>2011-10-13 11:17:19 +0600
committerAnton Bobov <bobov_a@sibsac.ru>2011-10-13 11:17:19 +0600
commitda709cd9e90c3ab644bb92700f0ed40d965b80d3 (patch)
tree144e5470327f72b8489141cd7595b652c6c32616 /files/.vim/ftplugin/html_snip_helper.vim
Initial commit.
Diffstat (limited to 'files/.vim/ftplugin/html_snip_helper.vim')
-rwxr-xr-xfiles/.vim/ftplugin/html_snip_helper.vim10
1 files changed, 10 insertions, 0 deletions
diff --git a/files/.vim/ftplugin/html_snip_helper.vim b/files/.vim/ftplugin/html_snip_helper.vim
new file mode 100755
index 0000000..2e54570
--- /dev/null
+++ b/files/.vim/ftplugin/html_snip_helper.vim
@@ -0,0 +1,10 @@
+" Helper function for (x)html snippets
+if exists('s:did_snip_helper') || &cp || !exists('loaded_snips')
+ finish
+endif
+let s:did_snip_helper = 1
+
+" Automatically closes tag if in xhtml
+fun! Close()
+ return stridx(&ft, 'xhtml') == -1 ? '' : ' /'
+endf