| 1 |
function! CurrentBufferIsModule(module_name) |
| 2 |
return EndsWith(bufname('%'), a:module_name.'.py') |
| 3 |
endfunction |
| 4 |
|
| 5 |
|
| 6 |
function EndsWith(string, end) |
| 7 |
let l:should = len(a:string) - strlen(a:end) |
| 8 |
return l:should == stridx(a:string, a:end, should) |
| 9 |
endfunction |
| 10 |
|
| 11 |
" vim: et:ts=4:sw=4 |