Compare commits

...

1 Commits

Author SHA1 Message Date
30c601e8b3 Add pip requirements.txt syntax highlighting 2021-07-12 13:36:44 +01:00
3 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1 @@
autocmd BufNewFile,BufReadPost */requirements.txt set filetype=requirements

View File

@ -0,0 +1,2 @@
set nospell
set commentstring=#%s

11
syntax/requirements.vim Normal file
View File

@ -0,0 +1,11 @@
if exists('b:current_syntax')
finish
endif
highlight default link requirementsComment Comment
highlight default link requirementsVersion Identifier
highlight default link requirementsOperator Operator
syntax region requirementsComment start='^\w*#' end='$' contains=@Spell
syntax match requirementsVersion '\d\+\.\d\+\.\d\+\w*'
syntax match requirementsOperator '=='