Skip to content

Commit

Permalink
misc: support marginal comments in Vim syntax
Browse files Browse the repository at this point in the history
Signed-off-by: Gerwin Klein <[email protected]>
  • Loading branch information
Smattr authored and lsf37 committed Apr 14, 2020
1 parent 7e30711 commit 18c9f36
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions misc/vim/isabelle.vim
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ syntax region IsabelleComment matchgroup=IsabelleComment start="(\*" end="\*)" c
syntax match IsabelleCommentStart "(\*" contained nextgroup=IsabelleCommentContent contains=IsabelleCommentStart
syntax match IsabelleCommentContent ".*" contained

syntax region IsabelleComment matchgroup=IsabelleComment fold start="\\<comment>\s*\\<open>" end="\\<close>" contains=IsabelleSpecial keepend

" You can use LaTeX within text {* ... *} blocks and friends and sometimes it
" is useful to have syntax highlighting enabled within these blocks when
" working on a PDF-destined theory. This is off by default because it can be a
Expand Down Expand Up @@ -638,10 +640,11 @@ syn match IsabelleSpecial /\\<s>/ conceal cchar=𝗌
syn match IsabelleSpecial /\\<Leftrightarrow>/ conceal cchar=
syn match IsabelleSpecial /\\<heartsuit>/ conceal cchar=
syn match IsabelleSpecial /\\<four>/ conceal cchar=𝟰
syn match IsabelleSpecial /\\<open>/ conceal cchar=
syn match IsabelleSpecial /\\<close>/ conceal cchar=
syn match IsabelleSpecial /\\<open>/ conceal cchar= transparent
syn match IsabelleSpecial /\\<close>/ conceal cchar= transparent
syn match IsabelleSpecial /\\<comment>/ conceal cchar= transparent

syn cluster IsabelleInnerStuff contains=IsabelleSpecial
syn cluster IsabelleInnerStuff contains=IsabelleSpecial,IsabelleComment

" Enable folding of proofs and locales. Note that the starting regex needs to
" match with zero width to preserve syntax highlighting of the opening command.
Expand Down

1 comment on commit 18c9f36

@lsf37
Copy link
Member

@lsf37 lsf37 commented on 18c9f36 Apr 15, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit is from PR #27

Please sign in to comment.