forgot to add utils

This commit is contained in:
David Halter
2013-08-23 10:29:52 +04:30
parent 8fb8d9903c
commit 3fb703f0a7

11
test/utils.vim Normal file
View File

@@ -0,0 +1,11 @@
function! g:current_buffer_is_module(module_name)
return g:ends_with(bufname('%'), a:module_name.'.py')
endfunction
function g:ends_with(string, end)
let l:should = len(a:string) - strlen(a:end)
return l:should == stridx(a:string, a:end, should)
endfunction
" vim: et:ts=4:sw=4