mirror of
https://github.com/raimon49/requirements.txt.vim.git
synced 2026-01-17 04:55:01 +08:00
18 lines
364 B
VimL
18 lines
364 B
VimL
function! s:isRequirementsFile()
|
|
let l:filename = expand("%:p")
|
|
|
|
if l:filename =~# '\v.*requirements\.(txt|in)'
|
|
return 1
|
|
endif
|
|
|
|
if l:filename =~# '\v.requirements/.*\.(txt|in)'
|
|
return 1
|
|
endif
|
|
|
|
return 0
|
|
endfunction
|
|
|
|
au BufNewFile,BufRead *.{txt,in} if s:isRequirementsFile() | set ft=requirements
|
|
|
|
" vim: et sw=4 ts=4 sts=4:
|