Highlight python doctests in docstrings
This commit is contained in:
parent
baf3d82b34
commit
40aaf63338
|
@ -12,8 +12,8 @@ hook global BufCreate .*[.](py) %{
|
||||||
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
|
|
||||||
add-highlighter shared/ regions -default code python \
|
add-highlighter shared/ regions -default code python \
|
||||||
double_string '"""' '"""' '' \
|
docstring '"""' '"""' '' \
|
||||||
single_string "'''" "'''" '' \
|
docstring "'''" "'''" '' \
|
||||||
double_string '"' (?<!\\)(\\\\)*" '' \
|
double_string '"' (?<!\\)(\\\\)*" '' \
|
||||||
single_string "'" (?<!\\)(\\\\)*' '' \
|
single_string "'" (?<!\\)(\\\\)*' '' \
|
||||||
comment '#' '$' ''
|
comment '#' '$' ''
|
||||||
|
@ -32,6 +32,13 @@ add-highlighter shared/python/code regex '\b\d+\+\d+[jJ]\b' 0:value
|
||||||
|
|
||||||
add-highlighter shared/python/double_string fill string
|
add-highlighter shared/python/double_string fill string
|
||||||
add-highlighter shared/python/single_string fill string
|
add-highlighter shared/python/single_string fill string
|
||||||
|
|
||||||
|
add-highlighter shared/python/docstring/ regions -default docstring py-docstring \
|
||||||
|
python '>>> \K' '\z' '' \
|
||||||
|
python '\.\.\. \K' '\z' ''
|
||||||
|
add-highlighter shared/python/docstring/py-docstring/python ref python
|
||||||
|
add-highlighter shared/python/docstring/py-docstring/docstring fill string
|
||||||
|
|
||||||
add-highlighter shared/python/comment fill comment
|
add-highlighter shared/python/comment fill comment
|
||||||
|
|
||||||
%sh{
|
%sh{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user