aboutsummaryrefslogtreecommitdiff
path: root/modules/vim/vim.dot.link/ftplugin/html_snip_helper.vim
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-02-01 01:25:10 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-02-01 01:25:10 -0200
commit6b9187673ee62d11042832f938913f15131592a7 (patch)
tree9e70016667efe273a72ab351aafaddbdb099e123 /modules/vim/vim.dot.link/ftplugin/html_snip_helper.vim
parent25235935e6c90557a4d6791c8d8f3a5cdf89681a (diff)
downloadmetadot-6b9187673ee62d11042832f938913f15131592a7.tar.gz
metadot-6b9187673ee62d11042832f938913f15131592a7.tar.bz2
Adding metadot script
Diffstat (limited to 'modules/vim/vim.dot.link/ftplugin/html_snip_helper.vim')
-rw-r--r--modules/vim/vim.dot.link/ftplugin/html_snip_helper.vim10
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/vim/vim.dot.link/ftplugin/html_snip_helper.vim b/modules/vim/vim.dot.link/ftplugin/html_snip_helper.vim
new file mode 100644
index 0000000..2e54570
--- /dev/null
+++ b/modules/vim/vim.dot.link/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