|
suppose the filetype is en. Then, write a file
~/.vim/syntax/en.vim with contents as follows:
syn case ignore
syn region enIdentifier start=/`/ end=/`/
syn region enString start=/"/ end=/"/
syn region enType start=/</ end=/>/
syn region enUnderlined start=/|/ end=/|/
syn sync minlines=10
syn case match
hi def link enIdentifier Identifier
hi def link enString String
hi def link enType Type
hi def link enUnderlined Underlined
let b:current_syntax = "en"
----------- end of en.vim ---------------
we also need another file
~/.vim/filetype.vim :
augroup filetypedetect
au BufNewFile,BufRead *.en setf en
augroup END
----------- end of filetype.vim ---------
more helps refer to these:
:h hightlight
:h syntax
:h usr_44.txt
enjoy! |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|