Add honza snippets function for compatibility
This commit is contained in:
parent
33dca18724
commit
4fcc89017b
11
autoload/vim_snippets.vim
Normal file
11
autoload/vim_snippets.vim
Normal 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
|
Loading…
Reference in New Issue
Block a user