0
我有這樣的Vimscript:Vimscript中的語法不是模式
syn region fdocCommand start="^@" end="$" contained
syn region fdocComment start="^@" end="^@tangle " contains=fdocCommand keepend
" syn region fdocComment start="^@" end="^@felix" contains=fdocCommand keepend
,但我需要的是通過限定的區域:其次是任何東西,除了"tangle"
或"felix"
和任何"@tangle"
或"@felix"
結束start="^@"
。疲軟的形式,實際上做的,無論是@tangle
線之上或註釋掉@felix
線。
實際使用是一個有文化的編程工具,@commands
像@h1
標題,@title
等,以及代碼由@felix
或@tangle
介紹,結束在下次@command
。正好我的網絡服務器能與語法高亮和超鏈接,而真正集代碼的命令顯示這種包括@python
,@ocaml
,@c++
等。費利克斯的@[email protected]
序列實際上是由編譯器爲註釋認可,所以有文化代碼直接編譯。
謝謝!這似乎工作:SYN區域fdocComment開始= 「!^ @ \%(\%(糾結\ |菲利克斯\)\)\ @」 end =「^ @ \%(tangle \ | felix \)」contains = fdocCommand keepend。 – Yttrill