Initial commit after refactor
This commit is contained in:
4
vim/syntax/.gitignore
vendored
Normal file
4
vim/syntax/.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
*
|
||||
!README.md
|
||||
!timetracker.vim
|
||||
!.gitignore
|
9
vim/syntax/README.md
Normal file
9
vim/syntax/README.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# timetracker.vim syntax file and Git
|
||||
|
||||
The _timetracker.vim_ syntax file I use at my employer contains customer names
|
||||
so it's easy to tell the parts of my timetracker log lines are for particular
|
||||
customers (or other important entities). Since this information is sensitive,
|
||||
I am sanitizing it before I post it to my personal, public-facing Git repo on
|
||||
git.eldon.me.
|
||||
|
||||
Just run `./toggle_remote.sh` and it should do the right thing.
|
65
vim/syntax/timetracker.vim
Normal file
65
vim/syntax/timetracker.vim
Normal file
@@ -0,0 +1,65 @@
|
||||
" Vim syntaxtax file
|
||||
" Language: timetracker log
|
||||
" Creator: Trey Blancher $(base64 -d <<< dGJsYW5jaGVyQHBpbmRyb3AuY29tCg==)
|
||||
" Latest revision: 2025-05-21
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syntax keyword timetrackerCategories transparent contained
|
||||
syntax keyword timetrackerStartStop Begin End
|
||||
syntax keyword timetrackerStandardOps
|
||||
\ Auth
|
||||
\ Certified Kubernetes Administrator
|
||||
\ Grafana
|
||||
\ Prometheus
|
||||
\ Resource
|
||||
\ Risk
|
||||
\ access
|
||||
\ daily
|
||||
\ email
|
||||
\ handling
|
||||
\ lesson
|
||||
\ macOS
|
||||
\ meeting
|
||||
\ phoneprint
|
||||
\ prep
|
||||
\ scheduled
|
||||
\ standup
|
||||
\ timesheets
|
||||
\ timetracker
|
||||
\ triage
|
||||
\ upgrades
|
||||
\ verification
|
||||
syntax keyword Providers
|
||||
\ Foundation
|
||||
\ Customer 2
|
||||
\ Customer 3
|
||||
|
||||
syntax match timetrackerTimestamp /\d\{4}-\%(0[135789]-\%([0-2]\d\|3[01]\)\|\%(1[02]-\%([0-2]\d\|3[01]\)\)\|0[46]-\%([0-2]\d\|30\)\|11-\%([0-2]\d\|30\)\|02-[0-2]\d\) \%([01]\d\|2[0-3]\):\%([0-5]\d\)\%(:[0-5]\d\)\{2}/ contained
|
||||
"syntax match ticket /\(#|CM-|PD-\)\d\+/
|
||||
"syntax match timetrackerTimestampError /^\(\d\{4}-\d\{2}-\d\{2} \d\{2}:\d\{2}:\d\{2}\)\@!/ contained
|
||||
syntax match timetrackerTask /.*/ contained
|
||||
|
||||
"syntax match timetrackerTimestampError /^\(\(\d\{4}-\d\{2}-\d\{2} \d\{2}:\d\{2}:\d\{2}\)\@!\)/ transparent contained
|
||||
|
||||
|
||||
"syntax region errTimestamp matchgroup=timestamp start=/^\(\d\{4}-\(0\d\|1[0-2]\)-\d\{2} \d\{2}:\d\{2}:\d\{2}\)\@!/ end=/: / contains=timetrackerTimestamp
|
||||
syntax region timestampGroup start=/^/ end=/: / contains=timetrackerTimestamp
|
||||
syntax region errTimestamp matchgroup=timestamp start="^\%(\d\{4}-\%(\%(0[13578]\|1[02]\)-\%([0-2]\d\|3[01]\)\|\%(0[469]\|11\)-\%([0-2]\d\|30\)\|02-[0-2]\d\) \%([01]\d\|2[0-3]\)\%(:[0-5]\d\)\{2}\)\@!" end=": "
|
||||
syntax region category start=/\[/ end=/\]/ contains=timetrackerCategories
|
||||
syntax region ticket start=/\(#\|CM-\|PD-\|NETENG-\|OPS-\|INC-\)\d\{-1}/ end=/\d /
|
||||
"syntax region item matchgroup=task start=/\]\s[\k ]\+/ end=/$/ contains=ticket
|
||||
|
||||
|
||||
let b:current_syntaxtax = "timetracker"
|
||||
|
||||
highlight default link errTimestamp Error
|
||||
highlight default link timestamp String
|
||||
highlight default link timestampGroup String
|
||||
highlight default link timetrackerStartStop Statement
|
||||
highlight default link category Type
|
||||
highlight default link ticket Constant
|
||||
highlight default link Providers Identifier
|
||||
highlight default link timetrackerStandardOps Define
|
Reference in New Issue
Block a user