Skip to content

Commit 2183453

Browse files
committed
add support for zsh
1 parent 10e38c7 commit 2183453

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

after/syntax/zsh.vim

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
syn match zshCommentColor contained '\(#[^#]*\)\@<=\zs#\x\{3}\%(\x\{3}\)\?\>' containedin=zshComment
2+
call css_color#init( 'hex', 'none'
3+
\, 'zshString,zshPOSIXString,zshHereDoc,'
4+
\. 'zshCommentColor' )

tests/example.zsh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# XXX #0f0 should show up green
2+
# XXX f00 should not show up red
3+
# FIXME ff0 should show up yellow but are known not to
4+
5+
echo '#0f0'
6+
echo ##0f0
7+
echo \#ff0
8+
echo #f00
9+
echo ##0f0
10+
echo # #0f0
11+
cmd '#0f0'
12+
cmd "#0f0"
13+
cmd \#ff0
14+
cmd #f00
15+
cmd ##0f0
16+
cmd # #0f0
17+
#f00
18+
##0f0 XXX
19+
# #0f0 XXX
20+
# XXX #0f0 XXX
21+
cat << ''
22+
#0f0
23+

0 commit comments

Comments
 (0)