mirror of
https://github.com/davidhalter/jedi-vim.git
synced 2025-12-06 18:54:44 +08:00
forgot to add utils
This commit is contained in:
11
test/utils.vim
Normal file
11
test/utils.vim
Normal 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
|
||||
Reference in New Issue
Block a user