Add honza snippets function for compatibility

This commit is contained in:
Shougo Matsushita 2015-01-28 21:51:16 +09:00
parent 33dca18724
commit 4fcc89017b

11
autoload/vim_snippets.vim Normal file
View File

@ -0,0 +1,11 @@
" For honza-snippets function.
function! vim_snippets#Filename(...)
let filename = expand('%:t:r')
if filename == ''
return a:0 == 2 ? a:2 : ''
elseif a:0 == 0 || a:1 == ''
return filename
else
return substitute(a:1, '$1', filename, 'g')
endif
endfunction