From bca51cb4037b587a6c71b35f24ae200b92120248 Mon Sep 17 00:00:00 2001 From: Holger Rapp Date: Wed, 30 Apr 2014 07:09:08 +0200 Subject: [PATCH] Brought back snipMate compatibility file. We cannot rely on people tracking vim-snippets to have the renmamed version of this available there. --- plugin/snipMate_compatibility.vim | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 plugin/snipMate_compatibility.vim diff --git a/plugin/snipMate_compatibility.vim b/plugin/snipMate_compatibility.vim new file mode 100644 index 0000000..6fcb82c --- /dev/null +++ b/plugin/snipMate_compatibility.vim @@ -0,0 +1,15 @@ +if exists('did_UltiSnips_snipmate_compatibility') + finish +endif +let did_UltiSnips_snipmate_compatibility = 1 + +if ! exists('g:snips_author') + let g:snips_author = "John Doe" +endif + +" Filename function, taken from snipMate.vim +fun! Filename(...) + let filename = expand('%:t:r') + if filename == '' | return a:0 == 2 ? a:2 : '' | endif + return !a:0 || a:1 == '' ? filename : substitute(a:1, '$1', filename, 'g') +endf