mirror of
https://github.com/raimon49/requirements.txt.vim.git
synced 2025-12-06 10:04:23 +08:00
23 lines
499 B
VimL
23 lines
499 B
VimL
" the Requirements File Format syntax support for Vim
|
|
" Version: 0.1
|
|
" Author: raimon <raimon49@hotmail.com>
|
|
" License: MIT LICENSE
|
|
"
|
|
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:
|