Skip to content

Added vim syntax highlighting for dbschemes #1461

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions misc/vim/ftdetect/dbscheme.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
au BufRead,BufNewFile *.dbscheme set filetype=dbscheme
13 changes: 13 additions & 0 deletions misc/vim/syntax/dbscheme.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
syn keyword dbschemeKeyword case of unique
syn keyword dbschemeType int ref string varchar

syn match dbschemeCustomType "\v[@][a-zA-Z_0-9]+"
syn match dbschemeInlineComment "//.*$"

syn region dbschemeComment start='/\*' end='\*/'

hi def link dbschemeType Type
hi def link dbschemeKeyword Keyword
hi def link dbschemeCustomType Type
hi def link dbschemeComment Comment
hi def link dbschemeInlineComment Comment