mirror of
https://github.com/amix/vimrc
synced 2024-12-26 03:43:08 +00:00
12 lines
282 B
VimL
12 lines
282 B
VimL
|
function! CurrentBufferIsModule(module_name)
|
||
|
return EndsWith(bufname('%'), a:module_name.'.py')
|
||
|
endfunction
|
||
|
|
||
|
|
||
|
function EndsWith(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
|