For a specific type of file, want to define customized comment with below requirements.
- Comment is start with
-comment
. - Comment content is surround by curly brackets
{ }
. - Only show comment content with comment color;
-comment
and curly brackets are displayed with default color.
If modify $VIM/syntax/file.vim
, add below commands, -comment { content }
will all displayed with comment color.
syn region myComment start=/\s*-comment *{/ end="}"
hi def link myComment Comment