enhance latex.kak: comments, \%, \_, \$
This commit is contained in:
parent
67eb19c6d2
commit
cf096a1f19
|
@ -16,15 +16,15 @@ hook global BufCreate .*\.tex %{
|
||||||
# ‾‾‾‾‾‾‾‾‾‾‾‾
|
# ‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
|
|
||||||
addhl -group / regions -default content latex \
|
addhl -group / regions -default content latex \
|
||||||
comment '^%' '\n' ''
|
comment '(?<!\\)%' '\n' ''
|
||||||
|
|
||||||
addhl -group /latex/comment fill comment
|
addhl -group /latex/comment fill comment
|
||||||
# Scopes, starting with a backslash
|
# Scopes, starting with a backslash
|
||||||
addhl -group /latex/content regex '\\\w+\b' 0:keyword
|
addhl -group /latex/content regex '\\(?!_)\w+\b' 0:keyword
|
||||||
# Options passed to scopes, between brackets
|
# Options passed to scopes, between brackets
|
||||||
addhl -group /latex/content regex '\\\w+\b\[([^]]+)\]' 1:value
|
addhl -group /latex/content regex '\\(?!_)\w+\b\[([^]]+)\]' 1:value
|
||||||
# Content between dollar signs/pairs
|
# Content between dollar signs/pairs
|
||||||
addhl -group /latex/content regex '\$\$?[^$]+\$\$?' 0:magenta
|
addhl -group /latex/content regex '(?<!\\)\$\$?([^$]|(?<=\\)\$)+\$\$?' 0:magenta
|
||||||
# Emphasized text
|
# Emphasized text
|
||||||
addhl -group /latex/content regex '\\(emph|textit)\{([^}]+)\}' 2:default+i
|
addhl -group /latex/content regex '\\(emph|textit)\{([^}]+)\}' 2:default+i
|
||||||
# Bold text
|
# Bold text
|
||||||
|
|
Loading…
Reference in New Issue
Block a user