~telemachus/nvim-dotfiles

ref: 44050482201cdb6dbcb03dd82ca607388b745e9c nvim-dotfiles/syntax/gradebook.vim -rw-r--r-- 1.0 KiB
44050482Peter Aronoff chore: set textwidth=72 in mail.vim 6 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
" Vim syntax file
" Language:     Gradebook (simple syntax for .gradebook files)
" Maintainer:   Peter Aronoff <peter@aronoff.org>

" Quit when a (custom) syntax file was already loaded
if exists('b:current_syntax')
    finish
endif

" Keywords
syn keyword gbKeyword NULL EXC ABS
syn keyword gbTodo contained TODO
syn keyword gbFixme contained FIXME

" Grade: integer number or floating point number with or without a dot
syn match gbGrade '-\=\d\+\.\=\d*'

syn match gbComma ','
syn match gbLastName '^[A-Z][[:alpha:]]\+'
syn match gbFirstName '[A-Z][[:alpha:]]\+' nextgroup=gbGrade,gbKeyword skipwhite

" Comments: single line only, beginning with '//'
syn match gbComment '\/\/.*$' contains=gbTodo,gbFixme

let b:current_syntax = 'gradebook'

hi def link gbKeyword Keyword
hi def link gbComma Operator
hi def link gbTodo Todo
hi def link gbFixme Error
hi def link gbGrade Number
hi def link gbComment Comment
hi gbLastName term=underline cterm=underline,bold gui=underline,bold
hi gbTodo gui=standout

" vim: set ts=8 sw=4 tw=75 :