Add my own 'pr' syntax

This commit is contained in:
Anthony Rose 2022-06-06 15:28:45 +01:00
parent 19bcab85fd
commit c9166c27ac
2 changed files with 23 additions and 0 deletions

1
ftdetect/pr.vim Normal file
View file

@ -0,0 +1 @@
autocmd BufRead,BufNewFile *.pr set filetype=pr

22
syntax/pr.vim Normal file
View file

@ -0,0 +1,22 @@
" Project syntax file.
" Anthony Perkins
if exists("b:current_syntax")
finish
endif
syntax region prName start="^\s*#" end="$"
syntax match prName /^.\+\n=\+$/
syntax match prName /^.\+\n-\+$/
syntax match prTodo /^\s*TODO:/
syntax match prWork /^\s*WORK:/
syntax match prDone /^\s*DONE:/
syntax match prDate /\<\d\{4}-\d\{2}-\d\{2}\>/
hi prName term=bold cterm=bold gui=bold
hi prTodo term=bold,underline cterm=bold,underline gui=bold,underline ctermfg=1 guifg=#ff0000
hi prWork term=bold,underline cterm=bold,underline gui=bold,underline ctermfg=1 guifg=#ff8000
hi prDone term=bold,underline cterm=bold,underline gui=bold,underline ctermfg=1 guifg=#008000
hi prDate term=bold cterm=bold gui=bold ctermfg=1 guifg=#0000ff
let b:current_syntax = 'pr'