2021-10-24 23:02:19 +08:00
|
|
|
" syn match vimChatMsg /^\[\d\d\(:\d\d\)\{0,2\}].\{-}:/ contains=vimChatTime,vimChatMe
|
|
|
|
" syn match vimChatTime /\[\d\d\(:\d\d\)\{0,2\}]/ contained nextgroup=vimChatMe
|
|
|
|
" syn match vimChatMe /Me:/ contained
|
|
|
|
" Comment, Type, String, Statement
|
|
|
|
" hi link vimChatMsg Comment
|
|
|
|
" hi link vimChatTime String
|
|
|
|
" hi link vimChatMe Type
|
2021-10-27 00:50:09 +08:00
|
|
|
" syn match vimChatMsg /^\[\d\d\(:\d\d\)\{0,2\}][^>]*/ contains=vimChatTime,vimChatNick
|
2022-05-02 15:33:17 +08:00
|
|
|
if !exists("main_syntax")
|
|
|
|
if version < 600
|
|
|
|
syntax clear
|
|
|
|
elseif exists("b:current_syntax")
|
|
|
|
finish
|
|
|
|
endif
|
|
|
|
let main_syntax = 'vimchat'
|
|
|
|
endif
|
|
|
|
|
|
|
|
syntax sync fromstart
|
2022-04-30 02:03:01 +08:00
|
|
|
syn match VimChatTime /\[\d\d\d\d-\d\d-\d\d\s\d\d\:\d\d]/
|
2022-05-01 00:03:46 +08:00
|
|
|
syn match VimChatVert /│/
|
|
|
|
syn match VimChatNick /\[\d\d\d\d-\d\d-\d\d\s\d\d\:\d\d]\s│[^│]*│/ contains=VimChatTime,VimChatVert
|
2022-05-02 12:24:26 +08:00
|
|
|
|
|
|
|
syntax match VimChatCodeBlock /`[^`]*`/
|
|
|
|
syntax match VimChatRemoteNickL /\*\*`/ conceal
|
2022-05-01 01:50:22 +08:00
|
|
|
syntax match VimChatRemoteNickR /`\*\*/ conceal
|
|
|
|
syntax match VimChatRemoteNick /**`[^`]*`\*\*/ contains=VimChatRemoteNickR,VimChatRemoteNickL
|
2022-05-01 11:26:36 +08:00
|
|
|
syntax match VimChatPing /\s\zs@\S*/
|
2022-05-02 13:50:53 +08:00
|
|
|
syntax match VimChatQuoteMsg /.*│\s>\s.*/ contains=VimChatTime,VimChatVert,VimChatNick
|
2022-05-02 13:16:21 +08:00
|
|
|
syn region VimChatCodeBlockLines start=".*│\s*````*.*$" end="│\s*````*\ze\s*$" contains=VimChatTime,VimChatVert,VimChatNick keepend
|
2022-05-04 14:52:58 +08:00
|
|
|
syntax match VimChatReplayCounts /.*│\s->\s\d*\s\(reply\|replies\)/ contains=VimChatTime,VimChatVert,VimChatNick
|
2021-10-27 00:50:09 +08:00
|
|
|
" hi def link vimChatMsg Comment
|
2022-04-30 23:52:33 +08:00
|
|
|
hi def link VimChatTime Comment
|
2022-05-02 13:50:53 +08:00
|
|
|
hi def link VimChatQuoteMsg Comment
|
2022-05-04 14:44:43 +08:00
|
|
|
hi def link VimChatReplayCounts Comment
|
2021-10-27 00:50:09 +08:00
|
|
|
hi def link VimChatNick Type
|
2022-05-01 00:03:46 +08:00
|
|
|
hi def link VimChatVert VertSplit
|
2022-05-01 01:50:22 +08:00
|
|
|
hi def link VimChatRemoteNick Todo
|
2022-05-01 11:26:36 +08:00
|
|
|
hi def link VimChatPing ModeMsg
|
2022-05-02 12:24:26 +08:00
|
|
|
hi def link VimChatCodeBlock String
|
2022-05-02 13:13:47 +08:00
|
|
|
hi def link VimChatCodeBlockLines String
|
2022-05-02 15:33:17 +08:00
|
|
|
|
|
|
|
let b:current_syntax = "vimchat"
|
|
|
|
if main_syntax == 'vimchat'
|
|
|
|
unlet main_syntax
|
|
|
|
endif
|