From c9166c27ac7739c23ed8f4c98450a5dc889d7553 Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Mon, 6 Jun 2022 15:28:45 +0100 Subject: [PATCH] Add my own 'pr' syntax --- ftdetect/pr.vim | 1 + syntax/pr.vim | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 ftdetect/pr.vim create mode 100644 syntax/pr.vim diff --git a/ftdetect/pr.vim b/ftdetect/pr.vim new file mode 100644 index 0000000..3624023 --- /dev/null +++ b/ftdetect/pr.vim @@ -0,0 +1 @@ +autocmd BufRead,BufNewFile *.pr set filetype=pr diff --git a/syntax/pr.vim b/syntax/pr.vim new file mode 100644 index 0000000..172d111 --- /dev/null +++ b/syntax/pr.vim @@ -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'