golden hour
/usr/share/vim/vim82/syntax
⬆️ Go Up
Upload
File/Folder
Size
Actions
2html.vim
73.65 KB
Del
OK
8th.vim
28.02 KB
Del
OK
README.txt
1.37 KB
Del
OK
a2ps.vim
2.37 KB
Del
OK
a65.vim
6.24 KB
Del
OK
aap.vim
5.56 KB
Del
OK
abap.vim
8.94 KB
Del
OK
abaqus.vim
1.07 KB
Del
OK
abc.vim
1.8 KB
Del
OK
abel.vim
4.99 KB
Del
OK
acedb.vim
4.76 KB
Del
OK
ada.vim
12.74 KB
Del
OK
aflex.vim
4.27 KB
Del
OK
ahdl.vim
2.71 KB
Del
OK
aidl.vim
629 B
Del
OK
alsaconf.vim
1.51 KB
Del
OK
amiga.vim
2.9 KB
Del
OK
aml.vim
23.57 KB
Del
OK
ampl.vim
4.01 KB
Del
OK
ant.vim
5.68 KB
Del
OK
antlr.vim
1.75 KB
Del
OK
apache.vim
15.01 KB
Del
OK
apachestyle.vim
1.38 KB
Del
OK
aptconf.vim
21.71 KB
Del
OK
arch.vim
1.12 KB
Del
OK
arduino.vim
1.98 KB
Del
OK
art.vim
1.27 KB
Del
OK
asciidoc.vim
10.88 KB
Del
OK
asm.vim
5.9 KB
Del
OK
asm68k.vim
13.95 KB
Del
OK
asmh8300.vim
1.68 KB
Del
OK
asn.vim
2.52 KB
Del
OK
aspperl.vim
811 B
Del
OK
aspvbs.vim
8.89 KB
Del
OK
asterisk.vim
5.5 KB
Del
OK
asteriskvm.vim
2.28 KB
Del
OK
atlas.vim
2.54 KB
Del
OK
autodoc.vim
3.64 KB
Del
OK
autohotkey.vim
11.58 KB
Del
OK
autoit.vim
46.89 KB
Del
OK
automake.vim
3.85 KB
Del
OK
ave.vim
1.86 KB
Del
OK
avra.vim
2.62 KB
Del
OK
awk.vim
8 KB
Del
OK
ayacc.vim
2.52 KB
Del
OK
b.vim
4.79 KB
Del
OK
baan.vim
71.87 KB
Del
OK
bash.vim
371 B
Del
OK
basic.vim
8.11 KB
Del
OK
bc.vim
1.75 KB
Del
OK
bdf.vim
3.75 KB
Del
OK
bib.vim
5.86 KB
Del
OK
bindzone.vim
4.79 KB
Del
OK
blank.vim
794 B
Del
OK
bsdl.vim
377 B
Del
OK
bst.vim
2.76 KB
Del
OK
btm.vim
9.07 KB
Del
OK
bzl.vim
374 B
Del
OK
bzr.vim
1.52 KB
Del
OK
c.vim
26.99 KB
Del
OK
cabal.vim
7.19 KB
Del
OK
cabalconfig.vim
1.15 KB
Del
OK
cabalproject.vim
944 B
Del
OK
calendar.vim
4.92 KB
Del
OK
catalog.vim
921 B
Del
OK
cdl.vim
3.02 KB
Del
OK
cdrdaoconf.vim
3.56 KB
Del
OK
cdrtoc.vim
22.22 KB
Del
OK
cf.vim
18.21 KB
Del
OK
cfg.vim
1.32 KB
Del
OK
ch.vim
922 B
Del
OK
chaiscript.vim
2.82 KB
Del
OK
change.vim
901 B
Del
OK
changelog.vim
2.05 KB
Del
OK
chaskell.vim
333 B
Del
OK
cheetah.vim
1.71 KB
Del
OK
chicken.vim
2.56 KB
Del
OK
chill.vim
7.84 KB
Del
OK
chordpro.vim
2.46 KB
Del
OK
cl.vim
3.81 KB
Del
OK
clean.vim
3.08 KB
Del
OK
clipper.vim
5.45 KB
Del
OK
clojure.vim
45.4 KB
Del
OK
cmake.vim
41.16 KB
Del
OK
cmod.vim
6.12 KB
Del
OK
cmusrc.vim
12.62 KB
Del
OK
cobol.vim
13.27 KB
Del
OK
coco.vim
1.27 KB
Del
OK
colortest.vim
3.13 KB
Del
OK
conaryrecipe.vim
7.85 KB
Del
OK
conf.vim
799 B
Del
OK
config.vim
2.03 KB
Del
OK
context.vim
6.05 KB
Del
OK
cpp.vim
3.5 KB
Del
OK
crm.vim
1.17 KB
Del
OK
crontab.vim
2.16 KB
Del
OK
cs.vim
10.69 KB
Del
OK
csc.vim
8.25 KB
Del
OK
csdl.vim
23.2 KB
Del
OK
csh.vim
6.31 KB
Del
OK
csp.vim
6.98 KB
Del
OK
css.vim
32.17 KB
Del
OK
cterm.vim
6.26 KB
Del
OK
ctrlh.vim
688 B
Del
OK
cucumber.vim
31.14 KB
Del
OK
cuda.vim
2.63 KB
Del
OK
cupl.vim
3.78 KB
Del
OK
cuplsim.vim
1.87 KB
Del
OK
cvs.vim
882 B
Del
OK
cvsrc.vim
1.22 KB
Del
OK
cweb.vim
2.82 KB
Del
OK
cynlib.vim
2.49 KB
Del
OK
cynpp.vim
1.23 KB
Del
OK
d.vim
27.96 KB
Del
OK
dart.vim
3.21 KB
Del
OK
datascript.vim
3.72 KB
Del
OK
dcd.vim
1.76 KB
Del
OK
dcl.vim
6.23 KB
Del
OK
debchangelog.vim
3.35 KB
Del
OK
debcontrol.vim
8.52 KB
Del
OK
debcopyright.vim
1.11 KB
Del
OK
debsources.vim
2.15 KB
Del
OK
def.vim
1.07 KB
Del
OK
denyhosts.vim
7.19 KB
Del
OK
desc.vim
3 KB
Del
OK
desktop.vim
9.13 KB
Del
OK
dictconf.vim
3.04 KB
Del
OK
dictdconf.vim
6.31 KB
Del
OK
diff.vim
17.01 KB
Del
OK
dircolors.vim
6.78 KB
Del
OK
dirpager.vim
1.75 KB
Del
OK
diva.vim
4.63 KB
Del
OK
django.vim
3.84 KB
Del
OK
dns.vim
132 B
Del
OK
dnsmasq.vim
9.83 KB
Del
OK
docbk.vim
10.08 KB
Del
OK
docbksgml.vim
193 B
Del
OK
docbkxml.vim
191 B
Del
OK
dockerfile.vim
2.42 KB
Del
OK
dosbatch.vim
6.11 KB
Del
OK
dosini.vim
1.24 KB
Del
OK
dot.vim
2.95 KB
Del
OK
doxygen.vim
38 KB
Del
OK
dracula.vim
2.61 KB
Del
OK
dsl.vim
1.28 KB
Del
OK
dtd.vim
4.89 KB
Del
OK
dtml.vim
16.22 KB
Del
OK
dtrace.vim
6.29 KB
Del
OK
dts.vim
1.18 KB
Del
OK
dune.vim
1.9 KB
Del
OK
dylan.vim
3.33 KB
Del
OK
dylanintr.vim
1.05 KB
Del
OK
dylanlid.vim
664 B
Del
OK
ecd.vim
1.2 KB
Del
OK
edif.vim
1.25 KB
Del
OK
eiffel.vim
6.76 KB
Del
OK
elf.vim
2.29 KB
Del
OK
elinks.vim
10.25 KB
Del
OK
elm.vim
3.57 KB
Del
OK
elmfilt.vim
2.83 KB
Del
OK
erlang.vim
10.87 KB
Del
OK
eruby.vim
3.22 KB
Del
OK
esmtprc.vim
938 B
Del
OK
esqlc.vim
2.04 KB
Del
OK
esterel.vim
2.98 KB
Del
OK
eterm.vim
18.72 KB
Del
OK
euphoria3.vim
5.96 KB
Del
OK
euphoria4.vim
14.2 KB
Del
OK
eviews.vim
4.89 KB
Del
OK
exim.vim
17.66 KB
Del
OK
expect.vim
3.65 KB
Del
OK
exports.vim
1.71 KB
Del
OK
falcon.vim
11.73 KB
Del
OK
fan.vim
5.32 KB
Del
OK
fasm.vim
8.55 KB
Del
OK
fdcc.vim
5.52 KB
Del
OK
fetchmail.vim
3.23 KB
Del
OK
fgl.vim
7.1 KB
Del
OK
flexwiki.vim
5.31 KB
Del
OK
focexec.vim
3.44 KB
Del
OK
form.vim
6.24 KB
Del
OK
forth.vim
10.42 KB
Del
OK
fortran.vim
32.28 KB
Del
OK
foxpro.vim
32.09 KB
Del
OK
framescript.vim
11.41 KB
Del
OK
freebasic.vim
10.58 KB
Del
OK
fstab.vim
15.53 KB
Del
OK
fvwm.vim
24.44 KB
Del
OK
fvwm2m4.vim
711 B
Del
OK
gdb.vim
4.26 KB
Del
OK
gdmo.vim
3.22 KB
Del
OK
gedcom.vim
2.22 KB
Del
OK
gift.vim
10 KB
Del
OK
git.vim
4.2 KB
Del
OK
gitcommit.vim
4.96 KB
Del
OK
gitconfig.vim
1.56 KB
Del
OK
gitolite.vim
4.35 KB
Del
OK
gitrebase.vim
2.88 KB
Del
OK
gitsendemail.vim
580 B
Del
OK
gkrellmrc.vim
4.02 KB
Del
OK
gnash.vim
3.38 KB
Del
OK
gnuplot.vim
23.11 KB
Del
OK
go.vim
7.72 KB
Del
OK
godoc.vim
352 B
Del
OK
gp.vim
2.9 KB
Del
OK
gpg.vim
5.46 KB
Del
OK
gprof.vim
2.07 KB
Del
OK
grads.vim
1.7 KB
Del
OK
gretl.vim
3.64 KB
Del
OK
groff.vim
293 B
Del
OK
groovy.vim
21.96 KB
Del
OK
group.vim
1.68 KB
Del
OK
grub.vim
3.79 KB
Del
OK
gsp.vim
1.98 KB
Del
OK
gtkrc.vim
9.1 KB
Del
OK
haml.vim
6.91 KB
Del
OK
hamster.vim
13.52 KB
Del
OK
haskell.vim
9.03 KB
Del
OK
haste.vim
4.88 KB
Del
OK
hastepreproc.vim
1.39 KB
Del
OK
hb.vim
3.08 KB
Del
OK
help.vim
8.19 KB
Del
OK
help_ru.vim
3.43 KB
Del
OK
hercules.vim
5.59 KB
Del
OK
hex.vim
3.92 KB
Del
OK
hgcommit.vim
1.09 KB
Del
OK
hitest.vim
3.56 KB
Del
OK
hog.vim
11.83 KB
Del
OK
hollywood.vim
43.41 KB
Del
OK
hostconf.vim
3.78 KB
Del
OK
hostsaccess.vim
549 B
Del
OK
html.vim
18.11 KB
Del
OK
htmlcheetah.vim
488 B
Del
OK
htmldjango.vim
1011 B
Del
OK
htmlm4.vim
670 B
Del
OK
htmlos.vim
8.12 KB
Del
OK
ia64.vim
10.23 KB
Del
OK
ibasic.vim
6.87 KB
Del
OK
icemenu.vim
824 B
Del
OK
icon.vim
6.81 KB
Del
OK
idl.vim
19.43 KB
Del
OK
idlang.vim
13.15 KB
Del
OK
indent.vim
7 KB
Del
OK
inform.vim
19.03 KB
Del
OK
initex.vim
18.77 KB
Del
OK
initng.vim
3.32 KB
Del
OK
inittab.vim
2.48 KB
Del
OK
ipfilter.vim
1.58 KB
Del
OK
ishd.vim
26.42 KB
Del
OK
iss.vim
4.91 KB
Del
OK
ist.vim
1.95 KB
Del
OK
j.vim
9.22 KB
Del
OK
jal.vim
8.75 KB
Del
OK
jam.vim
26.08 KB
Del
OK
jargon.vim
740 B
Del
OK
java.vim
18.15 KB
Del
OK
javacc.vim
2.2 KB
Del
OK
javascript.vim
5.48 KB
Del
OK
javascriptreact.vim
133 B
Del
OK
jess.vim
6.08 KB
Del
OK
jgraph.vim
1.18 KB
Del
OK
jovial.vim
4.01 KB
Del
OK
jproperties.vim
5.37 KB
Del
OK
json.vim
6.11 KB
Del
OK
jsp.vim
2.62 KB
Del
OK
kconfig.vim
35.45 KB
Del
OK
kivy.vim
986 B
Del
OK
kix.vim
6.18 KB
Del
OK
kscript.vim
1.94 KB
Del
OK
kwt.vim
2.4 KB
Del
OK
lace.vim
3.98 KB
Del
OK
latte.vim
3.43 KB
Del
OK
ld.vim
2.85 KB
Del
OK
ldapconf.vim
12.99 KB
Del
OK
ldif.vim
1014 B
Del
OK
less.vim
4.1 KB
Del
OK
lex.vim
8.45 KB
Del
OK
lftp.vim
7.3 KB
Del
OK
lhaskell.vim
4.82 KB
Del
OK
libao.vim
636 B
Del
OK
lifelines.vim
6.48 KB
Del
OK
lilo.vim
10.18 KB
Del
OK
limits.vim
1.29 KB
Del
OK
liquid.vim
6.04 KB
Del
OK
lisp.vim
35.05 KB
Del
OK
lite.vim
4.73 KB
Del
OK
litestep.vim
6.52 KB
Del
OK
loginaccess.vim
4.1 KB
Del
OK
logindefs.vim
7.36 KB
Del
OK
logtalk.vim
16.45 KB
Del
OK
lotos.vim
2.31 KB
Del
OK
lout.vim
4.22 KB
Del
OK
lpc.vim
22.6 KB
Del
OK
lprolog.vim
3.89 KB
Del
OK
lscript.vim
11.82 KB
Del
OK
lsl.vim
15.43 KB
Del
OK
lss.vim
4.76 KB
Del
OK
lua.vim
13.72 KB
Del
OK
lynx.vim
6.42 KB
Del
OK
m4.vim
2.63 KB
Del
OK
mail.vim
5.93 KB
Del
OK
mailaliases.vim
2.7 KB
Del
OK
mailcap.vim
1.11 KB
Del
OK
make.vim
6.05 KB
Del
OK
mallard.vim
1.69 KB
Del
OK
man.vim
1.64 KB
Del
OK
manconf.vim
4.24 KB
Del
OK
manual.vim
909 B
Del
OK
maple.vim
27.9 KB
Del
OK
markdown.vim
8.91 KB
Del
OK
masm.vim
16.84 KB
Del
OK
mason.vim
3.73 KB
Del
OK
master.vim
1022 B
Del
OK
matlab.vim
4.21 KB
Del
OK
maxima.vim
18.36 KB
Del
OK
mel.vim
3.33 KB
Del
OK
meson.vim
4.02 KB
Del
OK
messages.vim
2.65 KB
Del
OK
mf.vim
15.06 KB
Del
OK
mgl.vim
3.64 KB
Del
OK
mgp.vim
1.95 KB
Del
OK
mib.vim
2.63 KB
Del
OK
mix.vim
2.87 KB
Del
OK
mma.vim
11.52 KB
Del
OK
mmix.vim
4.85 KB
Del
OK
mmp.vim
1.45 KB
Del
OK
modconf.vim
1.39 KB
Del
OK
model.vim
1.43 KB
Del
OK
modsim3.vim
3.54 KB
Del
OK
modula2.vim
3.15 KB
Del
OK
modula3.vim
1.96 KB
Del
OK
monk.vim
9.98 KB
Del
OK
moo.vim
9.02 KB
Del
OK
mp.vim
43.49 KB
Del
OK
mplayerconf.vim
7.31 KB
Del
OK
mrxvtrc.vim
9.38 KB
Del
OK
msidl.vim
3.38 KB
Del
OK
msmessages.vim
6.17 KB
Del
OK
msql.vim
2.33 KB
Del
OK
mupad.vim
15.11 KB
Del
OK
murphi.vim
4.47 KB
Del
OK
mush.vim
12.88 KB
Del
OK
muttrc.vim
64.27 KB
Del
OK
mysql.vim
17.2 KB
Del
OK
n1ql.vim
12.6 KB
Del
OK
named.vim
9.77 KB
Del
OK
nanorc.vim
10.37 KB
Del
OK
nasm.vim
25.67 KB
Del
OK
nastran.vim
8.3 KB
Del
OK
natural.vim
6.81 KB
Del
OK
ncf.vim
13.1 KB
Del
OK
neomuttrc.vim
64 KB
Del
OK
netrc.vim
1.89 KB
Del
OK
netrw.vim
7.03 KB
Del
OK
ninja.vim
2.82 KB
Del
OK
nosyntax.vim
755 B
Del
OK
nqc.vim
13.74 KB
Del
OK
nroff.vim
7.6 KB
Del
OK
nsis.vim
33.26 KB
Del
OK
obj.vim
2.72 KB
Del
OK
objc.vim
40.79 KB
Del
OK
objcpp.vim
600 B
Del
OK
ocaml.vim
16.56 KB
Del
OK
occam.vim
4.21 KB
Del
OK
omnimark.vim
6.23 KB
Del
OK
opam.vim
1.37 KB
Del
OK
openroad.vim
13.65 KB
Del
OK
opl.vim
4.03 KB
Del
OK
ora.vim
26.5 KB
Del
OK
pamconf.vim
5.81 KB
Del
OK
pamenv.vim
1.11 KB
Del
OK
papp.vim
3.7 KB
Del
OK
pascal.vim
14.66 KB
Del
OK
passwd.vim
2.39 KB
Del
OK
pbtxt.vim
1.34 KB
Del
OK
pcap.vim
1.46 KB
Del
OK
pccts.vim
4 KB
Del
OK
pdf.vim
3.46 KB
Del
OK
perl.vim
37.57 KB
Del
OK
perl6.vim
72.39 KB
Del
OK
pf.vim
10.13 KB
Del
OK
pfmain.vim
90.56 KB
Del
OK
php.vim
95.59 KB
Del
OK
phtml.vim
151 B
Del
OK
pic.vim
3.25 KB
Del
OK
pike.vim
21.3 KB
Del
OK
pilrc.vim
5.19 KB
Del
OK
pine.vim
15.05 KB
Del
OK
pinfo.vim
5.17 KB
Del
OK
plaintex.vim
10.06 KB
Del
OK
pli.vim
12.91 KB
Del
OK
plm.vim
5.24 KB
Del
OK
plp.vim
1.24 KB
Del
OK
plsql.vim
12.62 KB
Del
OK
po.vim
6.24 KB
Del
OK
pod.vim
7.11 KB
Del
OK
poke.vim
5.07 KB
Del
OK
postscr.vim
45.05 KB
Del
OK
pov.vim
8.84 KB
Del
OK
povini.vim
3.41 KB
Del
OK
ppd.vim
868 B
Del
OK
ppwiz.vim
2.71 KB
Del
OK
prescribe.vim
2.33 KB
Del
OK
privoxy.vim
3.5 KB
Del
OK
procmail.vim
1.97 KB
Del
OK
progress.vim
31 KB
Del
OK
prolog.vim
4.39 KB
Del
OK
promela.vim
1.69 KB
Del
OK
proto.vim
3.46 KB
Del
OK
protocols.vim
1.4 KB
Del
OK
psf.vim
4.19 KB
Del
OK
ptcap.vim
4.03 KB
Del
OK
purifylog.vim
3.28 KB
Del
OK
pyrex.vim
1.62 KB
Del
OK
python.vim
12.78 KB
Del
OK
qf.vim
596 B
Del
OK
quake.vim
8.35 KB
Del
OK
r.vim
14.38 KB
Del
OK
racc.vim
5.49 KB
Del
OK
radiance.vim
6.99 KB
Del
OK
raml.vim
4.35 KB
Del
OK
ratpoison.vim
16.82 KB
Del
OK
rc.vim
9.98 KB
Del
OK
rcs.vim
2.08 KB
Del
OK
rcslog.vim
557 B
Del
OK
readline.vim
17.08 KB
Del
OK
rebol.vim
7 KB
Del
OK
redif.vim
85.88 KB
Del
OK
registry.vim
3.28 KB
Del
OK
rego.vim
3.74 KB
Del
OK
remind.vim
2.65 KB
Del
OK
resolv.vim
6.21 KB
Del
OK
reva.vim
7.41 KB
Del
OK
rexx.vim
14.97 KB
Del
OK
rhelp.vim
11.85 KB
Del
OK
rib.vim
2.14 KB
Del
OK
rmd.vim
5.26 KB
Del
OK
rnc.vim
2.21 KB
Del
OK
rng.vim
817 B
Del
OK
rnoweb.vim
1.86 KB
Del
OK
robots.vim
1.49 KB
Del
OK
rpcgen.vim
1.63 KB
Del
OK
rpl.vim
25.1 KB
Del
OK
rrst.vim
1.28 KB
Del
OK
rst.vim
11.5 KB
Del
OK
rtf.vim
2.28 KB
Del
OK
ruby.vim
40.15 KB
Del
OK
rust.vim
16.22 KB
Del
OK
samba.vim
5.99 KB
Del
OK
sas.vim
33.29 KB
Del
OK
sass.vim
6.12 KB
Del
OK
sather.vim
3.41 KB
Del
OK
sbt.vim
880 B
Del
OK
scala.vim
11.04 KB
Del
OK
scheme.vim
18.88 KB
Del
OK
scilab.vim
3.13 KB
Del
OK
screen.vim
8.89 KB
Del
OK
scss.vim
526 B
Del
OK
sd.vim
2.17 KB
Del
OK
sdc.vim
1.36 KB
Del
OK
sdl.vim
6.41 KB
Del
OK
sed.vim
4.92 KB
Del
OK
sendpr.vim
905 B
Del
OK
sensors.vim
1.48 KB
Del
OK
services.vim
1.78 KB
Del
OK
setserial.vim
5.11 KB
Del
OK
sexplib.vim
3.6 KB
Del
OK
sgml.vim
8.66 KB
Del
OK
sgmldecl.vim
1.99 KB
Del
OK
sgmllnx.vim
1.81 KB
Del
OK
sh.vim
43.22 KB
Del
OK
sicad.vim
18.04 KB
Del
OK
sieve.vim
1.63 KB
Del
OK
sil.vim
8.34 KB
Del
OK
simula.vim
3.29 KB
Del
OK
sinda.vim
3.58 KB
Del
OK
sindacmp.vim
1.24 KB
Del
OK
sindaout.vim
1.92 KB
Del
OK
sisu.vim
21.66 KB
Del
OK
skill.vim
25.17 KB
Del
OK
sl.vim
3.99 KB
Del
OK
slang.vim
3.22 KB
Del
OK
slice.vim
2.86 KB
Del
OK
slpconf.vim
11.51 KB
Del
OK
slpreg.vim
5.22 KB
Del
OK
slpspi.vim
1.15 KB
Del
OK
slrnrc.vim
12.51 KB
Del
OK
slrnsc.vim
3.03 KB
Del
OK
sm.vim
2.78 KB
Del
OK
smarty.vim
2.82 KB
Del
OK
smcl.vim
11.76 KB
Del
OK
smil.vim
5.48 KB
Del
OK
smith.vim
793 B
Del
OK
sml.vim
9.29 KB
Del
OK
snnsnet.vim
2.42 KB
Del
OK
snnspat.vim
2.18 KB
Del
OK
snnsres.vim
1.89 KB
Del
OK
snobol4.vim
5.21 KB
Del
OK
spec.vim
12.46 KB
Del
OK
specman.vim
7.17 KB
Del
OK
spice.vim
2.19 KB
Del
OK
splint.vim
15.42 KB
Del
OK
spup.vim
13.6 KB
Del
OK
spyce.vim
4.35 KB
Del
OK
sql.vim
1.09 KB
Del
OK
sqlanywhere.vim
40.95 KB
Del
OK
sqlforms.vim
6.58 KB
Del
OK
sqlhana.vim
10.77 KB
Del
OK
sqlinformix.vim
5.76 KB
Del
OK
sqlj.vim
2.9 KB
Del
OK
sqloracle.vim
7.47 KB
Del
OK
sqr.vim
12.71 KB
Del
OK
squid.vim
6.77 KB
Del
OK
srec.vim
3.73 KB
Del
OK
sshconfig.vim
11.17 KB
Del
OK
sshdconfig.vim
12.62 KB
Del
OK
st.vim
2.69 KB
Del
OK
stata.vim
26.42 KB
Del
OK
stp.vim
5.3 KB
Del
OK
strace.vim
1.92 KB
Del
OK
sudoers.vim
23.88 KB
Del
OK
svg.vim
436 B
Del
OK
svn.vim
1.81 KB
Del
OK
swift.vim
8.62 KB
Del
OK
swiftgyb.vim
822 B
Del
OK
syncolor.vim
4.04 KB
Del
OK
synload.vim
1.99 KB
Del
OK
syntax.vim
1.2 KB
Del
OK
sysctl.vim
1.13 KB
Del
OK
systemd.vim
184 B
Del
OK
systemverilog.vim
3.46 KB
Del
OK
tads.vim
6.7 KB
Del
OK
tags.vim
1.13 KB
Del
OK
tak.vim
2.85 KB
Del
OK
takcmp.vim
1.56 KB
Del
OK
takout.vim
1.95 KB
Del
OK
tap.vim
4.26 KB
Del
OK
tar.vim
373 B
Del
OK
taskdata.vim
1.18 KB
Del
OK
taskedit.vim
1.1 KB
Del
OK
tasm.vim
5.56 KB
Del
OK
tcl.vim
16.88 KB
Del
OK
tcsh.vim
12.96 KB
Del
OK
template.vim
449 B
Del
OK
teraterm.vim
4.86 KB
Del
OK
terminfo.vim
4.69 KB
Del
OK
tex.vim
63.52 KB
Del
OK
texinfo.vim
24.97 KB
Del
OK
texmf.vim
2.23 KB
Del
OK
tf.vim
6.74 KB
Del
OK
tidy.vim
13.24 KB
Del
OK
tilde.vim
1.5 KB
Del
OK
tli.vim
1.62 KB
Del
OK
tmux.vim
5.81 KB
Del
OK
tpp.vim
3.33 KB
Del
OK
trasys.vim
4.92 KB
Del
OK
treetop.vim
3.58 KB
Del
OK
trustees.vim
1.51 KB
Del
OK
tsalt.vim
8.13 KB
Del
OK
tsscl.vim
5 KB
Del
OK
tssgm.vim
2.72 KB
Del
OK
tssop.vim
1.74 KB
Del
OK
tt2.vim
7.74 KB
Del
OK
tt2html.vim
516 B
Del
OK
tt2js.vim
522 B
Del
OK
typescript.vim
1.39 KB
Del
OK
typescriptcommon.vim
131.23 KB
Del
OK
typescriptreact.vim
3.83 KB
Del
OK
uc.vim
6.48 KB
Del
OK
udevconf.vim
1.2 KB
Del
OK
udevperm.vim
2.35 KB
Del
OK
udevrules.vim
6.8 KB
Del
OK
uil.vim
2.75 KB
Del
OK
updatedb.vim
1.19 KB
Del
OK
upstart.vim
3.08 KB
Del
OK
upstreamdat.vim
13.72 KB
Del
OK
upstreaminstalllog.vim
971 B
Del
OK
upstreamlog.vim
2.56 KB
Del
OK
upstreamrpt.vim
13.86 KB
Del
OK
usserverlog.vim
3.04 KB
Del
OK
usw2kagtlog.vim
2.64 KB
Del
OK
valgrind.vim
3.14 KB
Del
OK
vb.vim
19.82 KB
Del
OK
vera.vim
19.09 KB
Del
OK
verilog.vim
4.94 KB
Del
OK
verilogams.vim
5.94 KB
Del
OK
vgrindefs.vim
1.19 KB
Del
OK
vhdl.vim
9.43 KB
Del
OK
vim.vim
73.19 KB
Del
OK
viminfo.vim
1.21 KB
Del
OK
virata.vim
11.34 KB
Del
OK
vmasm.vim
8.31 KB
Del
OK
voscm.vim
6.81 KB
Del
OK
vrml.vim
12.49 KB
Del
OK
vroom.vim
3.41 KB
Del
OK
vsejcl.vim
1004 B
Del
OK
vue.vim
433 B
Del
OK
wast.vim
3.83 KB
Del
OK
wdiff.vim
716 B
Del
OK
web.vim
1.09 KB
Del
OK
webmacro.vim
3.06 KB
Del
OK
wget.vim
3.87 KB
Del
OK
whitespace.vim
357 B
Del
OK
winbatch.vim
11.87 KB
Del
OK
wml.vim
5.6 KB
Del
OK
wsh.vim
1.21 KB
Del
OK
wsml.vim
5.27 KB
Del
OK
wvdial.vim
1.07 KB
Del
OK
xbl.vim
568 B
Del
OK
xdefaults.vim
5.75 KB
Del
OK
xf86conf.vim
14.38 KB
Del
OK
xhtml.vim
186 B
Del
OK
xinetd.vim
13.88 KB
Del
OK
xkb.vim
3.24 KB
Del
OK
xmath.vim
10.58 KB
Del
OK
xml.vim
8.92 KB
Del
OK
xmodmap.vim
45.42 KB
Del
OK
xpm.vim
4.3 KB
Del
OK
xpm2.vim
4.59 KB
Del
OK
xquery.vim
7.02 KB
Del
OK
xs.vim
240.96 KB
Del
OK
xsd.vim
2.08 KB
Del
OK
xslt.vim
2.59 KB
Del
OK
xxd.vim
767 B
Del
OK
yacc.vim
5.52 KB
Del
OK
yaml.vim
12.57 KB
Del
OK
z8a.vim
2.83 KB
Del
OK
zimbu.vim
6.29 KB
Del
OK
zsh.vim
24.58 KB
Del
OK
Edit: sh.vim
" Vim syntax file " Language: shell (sh) Korn shell (ksh) bash (sh) " Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM> " Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int> " Last Change: Nov 24, 2020 " Version: 196 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH " For options and settings, please use: :help ft-sh-syntax " This file includes many ideas from Eric Brunet (eric.brunet@ens.fr) and heredoc fixes from Felipe Contreras " quit when a syntax file was already loaded {{{1 if exists("b:current_syntax") finish endif " trying to answer the question: which shell is /bin/sh, really? " If the user has not specified any of g:is_kornshell, g:is_bash, g:is_posix, g:is_sh, then guess. if getline(1) =~ '\<ksh$' let b:is_kornshell = 1 elseif getline(1) =~ '\<bash$' let b:is_bash = 1 elseif getline(1) =~ '\<dash$' let b:is_dash = 1 elseif !exists("g:is_kornshell") && !exists("g:is_bash") && !exists("g:is_posix") && !exists("g:is_sh") && !exists("g:is_dash") let s:shell = "" if executable("/bin/sh") let s:shell = resolve("/bin/sh") elseif executable("/usr/bin/sh") let s:shell = resolve("/usr/bin/sh") endif if s:shell =~ 'ksh$' let b:is_kornshell= 1 elseif s:shell =~ 'bash$' let b:is_bash = 1 elseif s:shell =~ 'dash$' let b:is_dash = 1 endif unlet s:shell endif " handling /bin/sh with is_kornshell/is_sh {{{1 " b:is_sh is set when "#! /bin/sh" is found; " However, it often is just a masquerade by bash (typically Linux) " or kornshell (typically workstations with Posix "sh"). " So, when the user sets "g:is_bash", "g:is_kornshell", " or "g:is_posix", a b:is_sh is converted into b:is_bash/b:is_kornshell, " respectively. if !exists("b:is_kornshell") && !exists("b:is_bash") && !exists("b:is_dash") if exists("g:is_posix") && !exists("g:is_kornshell") let g:is_kornshell= g:is_posix endif if exists("g:is_kornshell") let b:is_kornshell= 1 if exists("b:is_sh") unlet b:is_sh endif elseif exists("g:is_bash") let b:is_bash= 1 if exists("b:is_sh") unlet b:is_sh endif elseif exists("g:is_dash") let b:is_dash= 1 if exists("b:is_sh") unlet b:is_sh endif else let b:is_sh= 1 endif endif " if b:is_dash, set b:is_posix too if exists("b:is_dash") let b:is_posix= 1 endif " set up default g:sh_fold_enabled {{{1 " ================================ if !exists("g:sh_fold_enabled") let g:sh_fold_enabled= 0 elseif g:sh_fold_enabled != 0 && !has("folding") let g:sh_fold_enabled= 0 echomsg "Ignoring g:sh_fold_enabled=".g:sh_fold_enabled."; need to re-compile vim for +fold support" endif if !exists("s:sh_fold_functions") let s:sh_fold_functions= and(g:sh_fold_enabled,1) endif if !exists("s:sh_fold_heredoc") let s:sh_fold_heredoc = and(g:sh_fold_enabled,2) endif if !exists("s:sh_fold_ifdofor") let s:sh_fold_ifdofor = and(g:sh_fold_enabled,4) endif if g:sh_fold_enabled && &fdm == "manual" " Given that the user provided g:sh_fold_enabled " AND g:sh_fold_enabled is manual (usual default) " implies a desire for syntax-based folding setl fdm=syntax endif " set up the syntax-highlighting iskeyword if (v:version == 704 && has("patch-7.4.1142")) || v:version > 704 if exists("b:is_bash") exe "syn iskeyword ".&iskeyword.",-,:" else exe "syn iskeyword ".&iskeyword.",-" endif endif " Set up folding commands for shell {{{1 " ================================= if s:sh_fold_functions com! -nargs=* ShFoldFunctions <args> fold else com! -nargs=* ShFoldFunctions <args> endif if s:sh_fold_heredoc com! -nargs=* ShFoldHereDoc <args> fold else com! -nargs=* ShFoldHereDoc <args> endif if s:sh_fold_ifdofor com! -nargs=* ShFoldIfDoFor <args> fold else com! -nargs=* ShFoldIfDoFor <args> endif " sh syntax is case sensitive {{{1 syn case match " Clusters: contains=@... clusters {{{1 "================================== syn cluster shErrorList contains=shDoError,shIfError,shInError,shCaseError,shEsacError,shCurlyError,shParenError,shTestError,shOK if exists("b:is_kornshell") || exists("b:is_bash") syn cluster ErrorList add=shDTestError endif syn cluster shArithParenList contains=shArithmetic,shCaseEsac,shComment,shDeref,shDo,shDerefSimple,shEcho,shEscape,shNumber,shOperator,shPosnParm,shExSingleQuote,shExDoubleQuote,shHereString,shRedir,shSingleQuote,shDoubleQuote,shStatement,shVariable,shAlias,shTest,shCtrlSeq,shSpecial,shParen,bashSpecialVariables,bashStatement,shIf,shFor,shFunctionKey,shFunctionOne,shFunctionTwo syn cluster shArithList contains=@shArithParenList,shParenError syn cluster shCaseEsacList contains=shCaseStart,shCaseLabel,shCase,shCaseBar,shCaseIn,shComment,shDeref,shDerefSimple,shCaseCommandSub,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote,shCtrlSeq,@shErrorList,shStringSpecial,shCaseRange syn cluster shCaseList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shCommandSubBQ,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq if exists("b:is_kornshell") || exists("b:is_bash") syn cluster shCaseList add=shForPP endif syn cluster shCommandSubList contains=shAlias,shArithmetic,shCmdParenRegion,shCommandSub,shComment,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shEcho,shEscape,shExDoubleQuote,shExpr,shExSingleQuote,shHereDoc,shNumber,shOperator,shOption,shPosnParm,shHereString,shRedir,shSingleQuote,shSpecial,shStatement,shSubSh,shTest,shVariable syn cluster shCurlyList contains=shNumber,shComma,shDeref,shDerefSimple,shDerefSpecial " COMBAK: removing shEscape fromshDblQuoteList fails ksh04:43 syn cluster shDblQuoteList contains=shArithmetic,shCommandSub,shCommandSubBQ,shDeref,shDerefSimple,shPosnParm,shCtrlSeq,shSpecial,shSpecialDQ syn cluster shDerefList contains=shDeref,shDerefSimple,shDerefVar,shDerefSpecial,shDerefWordError,shDerefPSR,shDerefPPS syn cluster shDerefVarList contains=shDerefOffset,shDerefOp,shDerefVarArray,shDerefOpError syn cluster shEchoList contains=shArithmetic,shCommandSub,shCommandSubBQ,shDeref,shDerefSimple,shEscape,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shCtrlSeq,shEchoQuote syn cluster shExprList1 contains=shCharClass,shNumber,shOperator,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shDblBrace,shDeref,shDerefSimple,shCtrlSeq syn cluster shExprList2 contains=@shExprList1,@shCaseList,shTest syn cluster shFunctionList contains=@shCommandSubList,shCaseEsac,shColon,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shOption,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shOperator,shCtrlSeq if exists("b:is_kornshell") || exists("b:is_bash") syn cluster shFunctionList add=shRepeat,shDblBrace,shDblParen,shForPP endif syn cluster shHereBeginList contains=@shCommandSubList syn cluster shHereList contains=shBeginHere,shHerePayload syn cluster shHereListDQ contains=shBeginHere,@shDblQuoteList,shHerePayload syn cluster shIdList contains=shCommandSub,shCommandSubBQ,shWrapLineOperator,shSetOption,shComment,shDeref,shDerefSimple,shHereString,shNumber,shOperator,shRedir,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shCtrlSeq,shStringSpecial,shAtExpr syn cluster shIfList contains=@shLoopList,shDblBrace,shDblParen,shFunctionKey,shFunctionOne,shFunctionTwo syn cluster shLoopList contains=@shCaseList,@shErrorList,shCaseEsac,shConditional,shDblBrace,shExpr,shFor,shIf,shOption,shSet,shTest,shTestOpr,shTouch if exists("b:is_kornshell") || exists("b:is_bash") syn cluster shLoopoList add=shForPP endif syn cluster shPPSLeftList contains=shAlias,shArithmetic,shCmdParenRegion,shCommandSub,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shEcho,shEscape,shExDoubleQuote,shExpr,shExSingleQuote,shHereDoc,shNumber,shOperator,shOption,shPosnParm,shHereString,shRedir,shSingleQuote,shSpecial,shStatement,shSubSh,shTest,shVariable syn cluster shPPSRightList contains=shComment,shDeref,shDerefSimple,shEscape,shPosnParm syn cluster shSubShList contains=@shCommandSubList,shCommandSubBQ,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shIf,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq,shOperator syn cluster shTestList contains=shArithmetic,shCharClass,shCommandSub,shCommandSubBQ,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shSpecialDQ,shExDoubleQuote,shExpr,shExSingleQuote,shNumber,shOperator,shSingleQuote,shTest,shTestOpr syn cluster shNoZSList contains=shSpecialNoZS syn cluster shForList contains=shTestOpr,shNumber,shDerefSimple,shDeref,shCommandSub,shCommandSubBQ,shArithmetic " Echo: {{{1 " ==== " This one is needed INSIDE a CommandSub, so that `echo bla` be correct syn region shEcho matchgroup=shStatement start="\<echo\>" skip="\\$" matchgroup=shEchoDelim end="$" matchgroup=NONE end="[<>;&|()`]"me=e-1 end="\d[<>]"me=e-2 end="#"me=e-1 contains=@shEchoList skipwhite nextgroup=shQuickComment syn region shEcho matchgroup=shStatement start="\<print\>" skip="\\$" matchgroup=shEchoDelim end="$" matchgroup=NONE end="[<>;&|()`]"me=e-1 end="\d[<>]"me=e-2 end="#"me=e-1 contains=@shEchoList skipwhite nextgroup=shQuickComment syn match shEchoQuote contained '\%(\\\\\)*\\["`'()]' " This must be after the strings, so that ... \" will be correct syn region shEmbeddedEcho contained matchgroup=shStatement start="\<print\>" skip="\\$" matchgroup=shEchoDelim end="$" matchgroup=NONE end="[<>;&|`)]"me=e-1 end="\d[<>]"me=e-2 end="\s#"me=e-2 contains=shNumber,shExSingleQuote,shSingleQuote,shDeref,shDerefSimple,shSpecialVar,shOperator,shExDoubleQuote,shDoubleQuote,shCharClass,shCtrlSeq " Alias: {{{1 " ===== if exists("b:is_kornshell") || exists("b:is_bash") || exists("b:is_posix") syn match shStatement "\<alias\>" syn region shAlias matchgroup=shStatement start="\<alias\>\s\+\(\h[-._[:alnum:]]\+\)\@=" skip="\\$" end="\>\|`" syn region shAlias matchgroup=shStatement start="\<alias\>\s\+\(\h[-._[:alnum:]]\+=\)\@=" skip="\\$" end="=" " Touch: {{{1 " ===== syn match shTouch '\<touch\>[^;#]*' skipwhite nextgroup=shComment contains=shTouchCmd,shDoubleQuote,shSingleQuote,shDeref,shDerefSimple syn match shTouchCmd '\<touch\>' contained endif " Error Codes: {{{1 " ============ if !exists("g:sh_no_error") syn match shDoError "\<done\>" syn match shIfError "\<fi\>" syn match shInError "\<in\>" syn match shCaseError ";;" syn match shEsacError "\<esac\>" syn match shCurlyError "}" syn match shParenError ")" syn match shOK '\.\(done\|fi\|in\|esac\)' if exists("b:is_kornshell") || exists("b:is_bash") syn match shDTestError "]]" endif syn match shTestError "]" endif " Options: {{{1 " ==================== syn match shOption "\s\zs[-+][-_a-zA-Z#@]\+" syn match shOption "\s\zs--[^ \t$=`'"|);]\+" " File Redirection Highlighted As Operators: {{{1 "=========================================== syn match shRedir "\d\=>\(&[-0-9]\)\=" syn match shRedir "\d\=>>-\=" syn match shRedir "\d\=<\(&[-0-9]\)\=" syn match shRedir "\d<<-\=" " Operators: {{{1 " ========== syn match shOperator "<<\|>>" contained syn match shOperator "[!&;|]" contained syn match shOperator "\[[[^:]\|\]]" contained syn match shOperator "[-=/*+%]\==" skipwhite nextgroup=shPattern syn match shPattern "\<\S\+\())\)\@=" contained contains=shExSingleQuote,shSingleQuote,shExDoubleQuote,shDoubleQuote,shDeref " Subshells: {{{1 " ========== syn region shExpr transparent matchgroup=shExprRegion start="{" end="}" contains=@shExprList2 nextgroup=shSpecialNxt syn region shSubSh transparent matchgroup=shSubShRegion start="[^(]\zs(" end=")" contains=@shSubShList nextgroup=shSpecialNxt " Tests: {{{1 "======= syn region shExpr matchgroup=shRange start="\[" skip=+\\\\\|\\$\|\[+ end="\]" contains=@shTestList,shSpecial syn region shTest transparent matchgroup=shStatement start="\<test\s" skip=+\\\\\|\\$+ matchgroup=NONE end="[;&|]"me=e-1 end="$" contains=@shExprList1 syn region shNoQuote start='\S' skip='\%(\\\\\)*\\.' end='\ze\s' end="\ze['"]" contained contains=shDerefSimple,shDeref syn match shAstQuote contained '\*\ze"' nextgroup=shString syn match shTestOpr contained '[^-+/%]\zs=' skipwhite nextgroup=shTestDoubleQuote,shTestSingleQuote,shTestPattern syn match shTestOpr contained "<=\|>=\|!=\|==\|=\~\|-.\>\|-\(nt\|ot\|ef\|eq\|ne\|lt\|le\|gt\|ge\)\>\|[!<>]" syn match shTestPattern contained '\w\+' syn region shTestDoubleQuote contained start='\%(\%(\\\\\)*\\\)\@<!"' skip=+\\\\\|\\"+ end='"' contains=shDeref,shDerefSimple,shDerefSpecial syn match shTestSingleQuote contained '\\.' nextgroup=shTestSingleQuote syn match shTestSingleQuote contained "'[^']*'" if exists("b:is_kornshell") || exists("b:is_bash") syn region shDblBrace matchgroup=Delimiter start="\[\[" skip=+\%(\\\\\)*\\$+ end="\]\]" contains=@shTestList,shAstQuote,shNoQuote,shComment syn region shDblParen matchgroup=Delimiter start="((" skip=+\%(\\\\\)*\\$+ end="))" contains=@shTestList,shComment endif " Character Class In Range: {{{1 " ========================= syn match shCharClass contained "\[:\(backspace\|escape\|return\|xdigit\|alnum\|alpha\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|tab\):\]" " Loops: do, if, while, until {{{1 " ====== ShFoldIfDoFor syn region shDo transparent matchgroup=shConditional start="\<do\>" matchgroup=shConditional end="\<done\>" contains=@shLoopList ShFoldIfDoFor syn region shIf transparent matchgroup=shConditional start="\<if\_s" matchgroup=shConditional skip=+-fi\>+ end="\<;\_s*then\>" end="\<fi\>" contains=@shIfList ShFoldIfDoFor syn region shFor matchgroup=shLoop start="\<for\ze\_s\s*\%(((\)\@!" end="\<in\>" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen skipwhite nextgroup=shCurlyIn if exists("b:is_kornshell") || exists("b:is_bash") ShFoldIfDoFor syn region shForPP matchgroup=shLoop start='\<for\>\_s*((' end='))' contains=@shForList endif if exists("b:is_kornshell") || exists("b:is_bash") || exists("b:is_posix") syn cluster shCaseList add=shRepeat syn cluster shFunctionList add=shRepeat syn region shRepeat matchgroup=shLoop start="\<while\_s" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen,shDblBrace syn region shRepeat matchgroup=shLoop start="\<until\_s" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen,shDblBrace if !exists("b:is_posix") syn region shCaseEsac matchgroup=shConditional start="\<select\s" matchgroup=shConditional end="\<in\>" end="\<do\>" contains=@shLoopList endif else syn region shRepeat matchgroup=shLoop start="\<while\_s" end="\<do\>"me=e-2 contains=@shLoopList syn region shRepeat matchgroup=shLoop start="\<until\_s" end="\<do\>"me=e-2 contains=@shLoopList endif syn region shCurlyIn contained matchgroup=Delimiter start="{" end="}" contains=@shCurlyList syn match shComma contained "," " Case: case...esac {{{1 " ==== syn match shCaseBar contained skipwhite "\(^\|[^\\]\)\(\\\\\)*\zs|" nextgroup=shCase,shCaseStart,shCaseBar,shComment,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote syn match shCaseStart contained skipwhite skipnl "(" nextgroup=shCase,shCaseBar syn match shCaseLabel contained skipwhite "\%(\\.\|[-a-zA-Z0-9_*.]\)\+" contains=shCharClass if exists("b:is_bash") ShFoldIfDoFor syn region shCase contained skipwhite skipnl matchgroup=shSnglCase start="\%(\\.\|[^#$()'" \t]\)\{-}\zs)" end=";;" end=";&" end=";;&" end="esac"me=s-1 contains=@shCaseList nextgroup=shCaseStart,shCase,shComment else ShFoldIfDoFor syn region shCase contained skipwhite skipnl matchgroup=shSnglCase start="\%(\\.\|[^#$()'" \t]\)\{-}\zs)" end=";;" end="esac"me=s-1 contains=@shCaseList nextgroup=shCaseStart,shCase,shComment endif ShFoldIfDoFor syn region shCaseEsac matchgroup=shConditional start="\<case\>" end="\<esac\>" contains=@shCaseEsacList syn keyword shCaseIn contained skipwhite skipnl in nextgroup=shCase,shCaseStart,shCaseBar,shComment,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote if exists("b:is_bash") syn region shCaseExSingleQuote matchgroup=shQuote start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial,shSpecial skipwhite skipnl nextgroup=shCaseBar contained elseif !exists("g:sh_no_error") syn region shCaseExSingleQuote matchgroup=Error start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial skipwhite skipnl nextgroup=shCaseBar contained endif syn region shCaseSingleQuote matchgroup=shQuote start=+'+ end=+'+ contains=shStringSpecial skipwhite skipnl nextgroup=shCaseBar contained syn region shCaseDoubleQuote matchgroup=shQuote start=+"+ skip=+\\\\\|\\.+ end=+"+ contains=@shDblQuoteList,shStringSpecial skipwhite skipnl nextgroup=shCaseBar contained syn region shCaseCommandSub start=+`+ skip=+\\\\\|\\.+ end=+`+ contains=@shCommandSubList skipwhite skipnl nextgroup=shCaseBar contained if exists("b:is_bash") syn region shCaseRange matchgroup=Delimiter start=+\[+ skip=+\\\\+ end=+\]+ contained contains=shCharClass syn match shCharClass '\[:\%(alnum\|alpha\|ascii\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|word\|or\|xdigit\):\]' contained else syn region shCaseRange matchgroup=Delimiter start=+\[+ skip=+\\\\+ end=+\]+ contained endif " Misc: {{{1 "====== syn match shWrapLineOperator "\\$" syn region shCommandSubBQ start="`" skip="\\\\\|\\." end="`" contains=shBQComment,@shCommandSubList "COMBAK: see ksh13:50 "syn match shEscape contained '\%(^\)\@!\%(\\\\\)*\\.' nextgroup=shSingleQuote,shDoubleQuote,shComment "COMBAK: see sh11:27 syn match shEscape contained '\%(^\)\@!\%(\\\\\)*\\.' nextgroup=shComment "COMBAK: see ksh13:53 "syn match shEscape contained '\%(^\)\@!\%(\\\\\)*\\.' " $() and $(()): {{{1 " $(..) is not supported by sh (Bourne shell). However, apparently " some systems (HP?) have as their /bin/sh a (link to) Korn shell " (ie. Posix compliant shell). /bin/ksh should work for those " systems too, however, so the following syntax will flag $(..) as " an Error under /bin/sh. By consensus of vimdev'ers! if exists("b:is_kornshell") || exists("b:is_bash") || exists("b:is_posix") syn region shCommandSub matchgroup=shCmdSubRegion start="\$(" skip='\\\\\|\\.' end=")" contains=@shCommandSubList syn region shArithmetic matchgroup=shArithRegion start="\$((" skip='\\\\\|\\.' end="))" contains=@shArithList syn region shArithmetic matchgroup=shArithRegion start="\$\[" skip='\\\\\|\\.' end="\]" contains=@shArithList syn match shSkipInitWS contained "^\s\+" elseif !exists("g:sh_no_error") syn region shCommandSub matchgroup=Error start="\$(" end=")" contains=@shCommandSubList endif syn region shCmdParenRegion matchgroup=shCmdSubRegion start="(\ze[^(]" skip='\\\\\|\\.' end=")" contains=@shCommandSubList if exists("b:is_bash") syn cluster shCommandSubList add=bashSpecialVariables,bashStatement syn cluster shCaseList add=bashAdminStatement,bashStatement syn keyword bashSpecialVariables contained auto_resume BASH BASH_ALIASES BASH_ALIASES BASH_ARGC BASH_ARGC BASH_ARGV BASH_ARGV BASH_CMDS BASH_CMDS BASH_COMMAND BASH_COMMAND BASH_ENV BASH_EXECUTION_STRING BASH_EXECUTION_STRING BASH_LINENO BASH_LINENO BASHOPTS BASHOPTS BASHPID BASHPID BASH_REMATCH BASH_REMATCH BASH_SOURCE BASH_SOURCE BASH_SUBSHELL BASH_SUBSHELL BASH_VERSINFO BASH_VERSION BASH_XTRACEFD BASH_XTRACEFD CDPATH COLUMNS COLUMNS COMP_CWORD COMP_CWORD COMP_KEY COMP_KEY COMP_LINE COMP_LINE COMP_POINT COMP_POINT COMPREPLY COMPREPLY COMP_TYPE COMP_TYPE COMP_WORDBREAKS COMP_WORDBREAKS COMP_WORDS COMP_WORDS COPROC COPROC DIRSTACK EMACS EMACS ENV ENV EUID FCEDIT FIGNORE FUNCNAME FUNCNAME FUNCNEST FUNCNEST GLOBIGNORE GROUPS histchars HISTCMD HISTCONTROL HISTFILE HISTFILESIZE HISTIGNORE HISTSIZE HISTTIMEFORMAT HISTTIMEFORMAT HOME HOSTFILE HOSTNAME HOSTTYPE IFS IGNOREEOF INPUTRC LANG LC_ALL LC_COLLATE LC_CTYPE LC_CTYPE LC_MESSAGES LC_NUMERIC LC_NUMERIC LINENO LINES LINES MACHTYPE MAIL MAILCHECK MAILPATH MAPFILE MAPFILE OLDPWD OPTARG OPTERR OPTIND OSTYPE PATH PIPESTATUS POSIXLY_CORRECT POSIXLY_CORRECT PPID PROMPT_COMMAND PS1 PS2 PS3 PS4 PWD RANDOM READLINE_LINE READLINE_LINE READLINE_POINT READLINE_POINT REPLY SECONDS SHELL SHELL SHELLOPTS SHLVL TIMEFORMAT TIMEOUT TMPDIR TMPDIR UID syn keyword bashStatement chmod clear complete du egrep expr fgrep find gnufind gnugrep grep less ls mkdir mv rm rmdir rpm sed sleep sort strip tail syn keyword bashAdminStatement daemon killall killproc nice reload restart start status stop syn keyword bashStatement command compgen endif if exists("b:is_kornshell") || exists("b:is_posix") syn cluster shCommandSubList add=kshSpecialVariables,kshStatement syn cluster shCaseList add=kshStatement syn keyword kshSpecialVariables contained CDPATH COLUMNS EDITOR ENV ERRNO FCEDIT FPATH HISTFILE HISTSIZE HOME IFS LINENO LINES MAIL MAILCHECK MAILPATH OLDPWD OPTARG OPTIND PATH PPID PS1 PS2 PS3 PS4 PWD RANDOM REPLY SECONDS SHELL TMOUT VISUAL syn keyword kshStatement cat chmod clear cp du egrep expr fgrep find grep killall less ls mkdir mv nice printenv rm rmdir sed sort strip stty tail tput syn keyword kshStatement command setgroups setsenv endif syn match shSource "^\.\s" syn match shSource "\s\.\s" "syn region shColon start="^\s*:" end="$" end="\s#"me=e-2 contains=@shColonList "syn region shColon start="^\s*\zs:" end="$" end="\s#"me=e-2 if exists("b:is_kornshell") || exists("b:is_posix") syn match shColon '^\s*\zs:' endif " String And Character Constants: {{{1 "================================ syn match shNumber "\<\d\+\>#\=" syn match shNumber "\<-\=\.\=\d\+\>#\=" syn match shCtrlSeq "\\\d\d\d\|\\[abcfnrtv0]" contained if exists("b:is_bash") syn match shSpecial "[^\\]\(\\\\\)*\zs\\\o\o\o\|\\x\x\x\|\\c[^"]\|\\[abefnrtv]" contained syn match shSpecial "^\(\\\\\)*\zs\\\o\o\o\|\\x\x\x\|\\c[^"]\|\\[abefnrtv]" contained syn region shExSingleQuote matchgroup=shQuote start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial,shSpecial nextgroup=shSpecialNxt syn region shExDoubleQuote matchgroup=shQuote start=+\$"+ skip=+\\\\\|\\.\|\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,shSpecial nextgroup=shSpecialNxt elseif !exists("g:sh_no_error") syn region shExSingleQuote matchGroup=Error start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial syn region shExDoubleQuote matchGroup=Error start=+\$"+ skip=+\\\\\|\\.+ end=+"+ contains=shStringSpecial endif syn region shSingleQuote matchgroup=shQuote start=+'+ end=+'+ contains=@Spell nextgroup=shSpecialStart,shSpecialSQ syn region shDoubleQuote matchgroup=shQuote start=+\%(\%(\\\\\)*\\\)\@<!"+ skip=+\\.+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell nextgroup=shSpecialStart syn region shDoubleQuote matchgroup=shQuote start=+"+ matchgroup=shSpecial skip=+\\"+ matchgroup=shQuote end=+"+ contained contains=@shDblQuoteList,shStringSpecial,@Spell nextgroup=shSpecialStart syn match shStringSpecial "[^[:print:] \t]" contained syn match shStringSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shComment syn match shSpecialSQ "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" contained nextgroup=shBkslshSnglQuote,@shNoZSList syn match shSpecialDQ "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" contained nextgroup=shBkslshDblQuote,@shNoZSList syn match shSpecialStart "\%(\\\\\)*\\[\\"'`$()#]" contained nextgroup=shBkslshSnglQuote,shBkslshDblQuote,@shNoZSList syn match shSpecial "^\%(\\\\\)*\\[\\"'`$()#]" syn match shSpecialNoZS contained "\%(\\\\\)*\\[\\"'`$()#]" syn match shSpecialNxt contained "\\[\\"'`$()#]" "syn region shBkslshSnglQuote contained matchgroup=shQuote start=+'+ end=+'+ contains=@Spell nextgroup=shSpecialStart "syn region shBkslshDblQuote contained matchgroup=shQuote start=+"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell nextgroup=shSpecialStart " Comments: {{{1 "========== syn cluster shCommentGroup contains=shTodo,@Spell if exists("b:is_bash") syn match shTodo contained "\<\%(COMBAK\|FIXME\|TODO\|XXX\)\ze:\=\>" else syn keyword shTodo contained COMBAK FIXME TODO XXX endif syn match shComment "^\s*\zs#.*$" contains=@shCommentGroup syn match shComment "\s\zs#.*$" contains=@shCommentGroup syn match shComment contained "#.*$" contains=@shCommentGroup syn match shQuickComment contained "#.*$" syn match shBQComment contained "#.\{-}\ze`" contains=@shCommentGroup " Here Documents: {{{1 " ========================================= ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc01 start="<<\s*\z([^ \t|>]\+\)" matchgroup=shHereDoc01 end="^\z1\s*$" contains=@shDblQuoteList ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc02 start="<<-\s*\z([^ \t|>]\+\)" matchgroup=shHereDoc02 end="^\s*\z1\s*$" contains=@shDblQuoteList ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc03 start="<<\s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc03 end="^\z1\s*$" ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc04 start="<<-\s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc04 end="^\s*\z1\s*$" ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc05 start="<<\s*'\z([^']\+\)'" matchgroup=shHereDoc05 end="^\z1\s*$" ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc06 start="<<-\s*'\z([^']\+\)'" matchgroup=shHereDoc06 end="^\s*\z1\s*$" ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc07 start="<<\s*\"\z([^"]\+\)\"" matchgroup=shHereDoc07 end="^\z1\s*$" ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc08 start="<<-\s*\"\z([^"]\+\)\"" matchgroup=shHereDoc08 end="^\s*\z1\s*$" ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc09 start="<<\s*\\\_$\_s*\z([^ \t|>]\+\)" matchgroup=shHereDoc09 end="^\z1\s*$" contains=@shDblQuoteList ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc10 start="<<-\s*\\\_$\_s*\z([^ \t|>]\+\)" matchgroup=shHereDoc10 end="^\s*\z1\s*$" contains=@shDblQuoteList ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc11 start="<<\s*\\\_$\_s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc11 end="^\z1\s*$" ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc12 start="<<-\s*\\\_$\_s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc12 end="^\s*\z1\s*$" ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc13 start="<<\s*\\\_$\_s*'\z([^']\+\)'" matchgroup=shHereDoc13 end="^\z1\s*$" ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc14 start="<<-\s*\\\_$\_s*'\z([^']\+\)'" matchgroup=shHereDoc14 end="^\s*\z1\s*$" ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc15 start="<<\s*\\\_$\_s*\"\z([^"]\+\)\"" matchgroup=shHereDoc15 end="^\z1\s*$" ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc16 start="<<-\s*\\\_$\_s*\"\z([^"]\+\)\"" matchgroup=shHereDoc16 end="^\s*\z1\s*$" " Here Strings: {{{1 " ============= " available for: bash; ksh (really should be ksh93 only) but not if its a posix if exists("b:is_bash") || (exists("b:is_kornshell") && !exists("b:is_posix")) syn match shHereString "<<<" skipwhite nextgroup=shCmdParenRegion endif " Identifiers: {{{1 "============= syn match shSetOption "\s\zs[-+][a-zA-Z0-9]\+\>" contained syn match shVariable "\<\h\w*\ze=" nextgroup=shVarAssign syn match shVarAssign "=" contained nextgroup=shCmdParenRegion,shPattern,shDeref,shDerefSimple,shDoubleQuote,shExDoubleQuote,shSingleQuote,shExSingleQuote,shVar syn match shVar contained "\h\w*" syn region shAtExpr contained start="@(" end=")" contains=@shIdList if exists("b:is_bash") syn match shSet "^\s*set\ze\s\+$" syn region shSetList oneline matchgroup=shSet start="\<\%(declare\|local\|export\)\>\ze[/a-zA-Z_]\@!" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+#\|=" contains=@shIdList syn region shSetList oneline matchgroup=shSet start="\<\%(set\|unset\)\>[/a-zA-Z_]\@!" end="\ze[;|#)]\|$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+=" contains=@shIdList nextgroup=shComment elseif exists("b:is_kornshell") || exists("b:is_posix") syn match shSet "^\s*set\ze\s\+$" if exists("b:is_dash") syn region shSetList oneline matchgroup=shSet start="\<\%(local\)\>\ze[/]\@!" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList endif syn region shSetList oneline matchgroup=shSet start="\<\(export\)\>\ze[/]\@!" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList syn region shSetList oneline matchgroup=shSet start="\<\%(set\|unset\>\)\ze[/a-zA-Z_]\@!" end="\ze[;|#)]\|$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList nextgroup=shComment else syn region shSetList oneline matchgroup=shSet start="\<\(set\|export\|unset\)\>\ze[/a-zA-Z_]\@!" end="\ze[;|#)]\|$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList endif " Functions: {{{1 if !exists("b:is_posix") syn keyword shFunctionKey function skipwhite skipnl nextgroup=shFunctionTwo endif if exists("b:is_bash") ShFoldFunctions syn region shFunctionOne matchgroup=shFunction start="^\s*[A-Za-z_0-9:][-a-zA-Z_0-9:]*\s*()\_s*{" end="}" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment ShFoldFunctions syn region shFunctionTwo matchgroup=shFunction start="\%(do\)\@!\&\<[A-Za-z_0-9:][-a-zA-Z_0-9:]*\>\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment ShFoldFunctions syn region shFunctionThree matchgroup=shFunction start="^\s*[A-Za-z_0-9:][-a-zA-Z_0-9:]*\s*()\_s*(" end=")" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment ShFoldFunctions syn region shFunctionFour matchgroup=shFunction start="\%(do\)\@!\&\<[A-Za-z_0-9:][-a-zA-Z_0-9:]*\>\s*\%(()\)\=\_s*)" end=")" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment else ShFoldFunctions syn region shFunctionOne matchgroup=shFunction start="^\s*\h\w*\s*()\_s*{" end="}" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment ShFoldFunctions syn region shFunctionTwo matchgroup=shFunction start="\%(do\)\@!\&\<\h\w*\>\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment ShFoldFunctions syn region shFunctionThree matchgroup=shFunction start="^\s*\h\w*\s*()\_s*(" end=")" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment ShFoldFunctions syn region shFunctionFour matchgroup=shFunction start="\%(do\)\@!\&\<\h\w*\>\s*\%(()\)\=\_s*(" end=")" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment endif " Parameter Dereferencing: {{{1 " ======================== if !exists("g:sh_no_error") syn match shDerefWordError "[^}$[~]" contained endif syn match shDerefSimple "\$\%(\h\w*\|\d\)" nextgroup=@shNoZSList syn region shDeref matchgroup=PreProc start="\${" end="}" contains=@shDerefList,shDerefVarArray nextgroup=shSpecialStart syn match shDerefSimple "\$[-#*@!?]" nextgroup=@shNoZSList syn match shDerefSimple "\$\$" nextgroup=@shNoZSList syn match shDerefSimple "\${\d}" nextgroup=@shNoZSList nextgroup=shSpecialStart if exists("b:is_bash") || exists("b:is_kornshell") || exists("b:is_posix") syn region shDeref matchgroup=PreProc start="\${##\=" end="}" contains=@shDerefList nextgroup=@shSpecialNoZS,shSpecialStart syn region shDeref matchgroup=PreProc start="\${\$\$" end="}" contains=@shDerefList nextgroup=@shSpecialNoZS,shSpecialStart endif " ksh: ${!var[*]} array index list syntax: {{{1 " ======================================== if exists("b:is_kornshell") || exists("b:is_posix") syn region shDeref matchgroup=PreProc start="\${!" end="}" contains=@shDerefVarArray endif " bash: ${!prefix*} and ${#parameter}: {{{1 " ==================================== if exists("b:is_bash") syn region shDeref matchgroup=PreProc start="\${!" end="\*\=}" contains=@shDerefList,shDerefOffset syn match shDerefVar contained "{\@<=!\h\w*" nextgroup=@shDerefVarList endif if exists("b:is_kornshell") syn match shDerefVar contained "{\@<=!\h\w*[[:alnum:]_.]*" nextgroup=@shDerefVarList endif syn match shDerefSpecial contained "{\@<=[-*@?0]" nextgroup=shDerefOp,shDerefOffset,shDerefOpError syn match shDerefSpecial contained "\({[#!]\)\@<=[[:alnum:]*@_]\+" nextgroup=@shDerefVarList,shDerefOp syn match shDerefVar contained "{\@<=\h\w*" nextgroup=@shDerefVarList syn match shDerefVar contained '\d' nextgroup=@shDerefVarList if exists("b:is_kornshell") || exists("b:is_posix") syn match shDerefVar contained "{\@<=\h\w*[[:alnum:]_.]*" nextgroup=@shDerefVarList endif " sh ksh bash : ${var[... ]...} array reference: {{{1 syn region shDerefVarArray contained matchgroup=shDeref start="\[" end="]" contains=@shCommandSubList nextgroup=shDerefOp,shDerefOpError " Special ${parameter OPERATOR word} handling: {{{1 " sh ksh bash : ${parameter:-word} word is default value " sh ksh bash : ${parameter:=word} assign word as default value " sh ksh bash : ${parameter:?word} display word if parameter is null " sh ksh bash : ${parameter:+word} use word if parameter is not null, otherwise nothing " ksh bash : ${parameter#pattern} remove small left pattern " ksh bash : ${parameter##pattern} remove large left pattern " ksh bash : ${parameter%pattern} remove small right pattern " ksh bash : ${parameter%%pattern} remove large right pattern " bash : ${parameter^pattern} Case modification " bash : ${parameter^^pattern} Case modification " bash : ${parameter,pattern} Case modification " bash : ${parameter,,pattern} Case modification " bash : ${@:start:qty} display command line arguments from start to start+qty-1 (inferred) syn cluster shDerefPatternList contains=shDerefPattern,shDerefString if !exists("g:sh_no_error") syn match shDerefOpError contained ":[[:punct:]]" endif syn match shDerefOp contained ":\=[-=?]" nextgroup=@shDerefPatternList syn match shDerefOp contained ":\=+" nextgroup=@shDerefPatternList if exists("b:is_bash") || exists("b:is_kornshell") || exists("b:is_posix") syn match shDerefOp contained "#\{1,2}" nextgroup=@shDerefPatternList syn match shDerefOp contained "%\{1,2}" nextgroup=@shDerefPatternList syn match shDerefPattern contained "[^{}]\+" contains=shDeref,shDerefSimple,shDerefPattern,shDerefString,shCommandSub,shDerefEscape nextgroup=shDerefPattern syn region shDerefPattern contained start="{" end="}" contains=shDeref,shDerefSimple,shDerefString,shCommandSub nextgroup=shDerefPattern syn match shDerefEscape contained '\%(\\\\\)*\\.' endif if exists("b:is_bash") syn match shDerefOp contained "[,^]\{1,2}" nextgroup=@shDerefPatternList endif syn region shDerefString contained matchgroup=shDerefDelim start=+\%(\\\)\@<!'+ end=+'+ contains=shStringSpecial syn region shDerefString contained matchgroup=shDerefDelim start=+\%(\\\)\@<!"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial syn match shDerefString contained "\\["']" nextgroup=shDerefPattern if exists("b:is_bash") || exists("b:is_kornshell") || exists("b:is_posix") " bash ksh posix : ${parameter:offset} " bash ksh posix : ${parameter:offset:length} syn region shDerefOffset contained start=':[^-=?+]' end='\ze:' end='\ze}' contains=shDeref,shDerefSimple,shDerefEscape nextgroup=shDerefLen,shDeref,shDerefSimple syn region shDerefOffset contained start=':\s-' end='\ze:' end='\ze}' contains=shDeref,shDerefSimple,shDerefEscape nextgroup=shDerefLen,shDeref,shDerefSimple syn match shDerefLen contained ":[^}]\+" contains=shDeref,shDerefSimple,shArithmetic endif if exists("b:is_bash") " bash : ${parameter//pattern/string} " bash : ${parameter//pattern} syn match shDerefPPS contained '/\{1,2}' nextgroup=shDerefPPSleft syn region shDerefPPSleft contained start='.' skip=@\%(\\\\\)*\\/@ matchgroup=shDerefOp end='/' end='\ze}' end='"' nextgroup=shDerefPPSright contains=@shPPSLeftList syn region shDerefPPSright contained start='.' skip=@\%(\\\\\)\+@ end='\ze}' contains=@shPPSRightList " bash : ${parameter/#substring/replacement} syn match shDerefPSR contained '/#' nextgroup=shDerefPSRleft,shDoubleQuote,shSingleQuote syn region shDerefPSRleft contained start='[^"']' skip=@\%(\\\\\)*\\/@ matchgroup=shDerefOp end='/' end='\ze}' nextgroup=shDerefPSRright syn region shDerefPSRright contained start='.' skip=@\%(\\\\\)\+@ end='\ze}' endif " Arithmetic Parenthesized Expressions: {{{1 "syn region shParen matchgroup=shArithRegion start='[^$]\zs(\%(\ze[^(]\|$\)' end=')' contains=@shArithParenList syn region shParen matchgroup=shArithRegion start='\$\@!(\%(\ze[^(]\|$\)' end=')' contains=@shArithParenList " Additional sh Keywords: {{{1 " =================== syn keyword shStatement break cd chdir continue eval exec exit kill newgrp pwd read readonly return shift test trap ulimit umask wait syn keyword shConditional contained elif else then if !exists("g:sh_no_error") syn keyword shCondError elif else then endif " Additional ksh Keywords and Aliases: {{{1 " =================================== if exists("b:is_kornshell") || exists("b:is_posix") syn keyword shStatement bg builtin disown enum export false fg getconf getopts hist jobs let printf sleep true unalias whence syn keyword shStatement typeset skipwhite nextgroup=shSetOption syn keyword shStatement autoload compound fc float functions hash history integer nameref nohup r redirect source stop suspend times type if exists("b:is_posix") syn keyword shStatement command else syn keyword shStatement time endif " Additional bash Keywords: {{{1 " ===================== elseif exists("b:is_bash") syn keyword shStatement bg builtin disown export false fg getopts jobs let printf sleep true unalias syn keyword shStatement typeset nextgroup=shSetOption syn keyword shStatement fc hash history source suspend times type syn keyword shStatement bind builtin caller compopt declare dirs disown enable export help logout mapfile popd pushd readarray shopt source typeset else syn keyword shStatement login newgrp endif " Synchronization: {{{1 " ================ if !exists("g:sh_minlines") let s:sh_minlines = 200 else let s:sh_minlines= g:sh_minlines endif if !exists("g:sh_maxlines") let s:sh_maxlines = 2*s:sh_minlines if s:sh_maxlines < 25 let s:sh_maxlines= 25 endif else let s:sh_maxlines= g:sh_maxlines endif exec "syn sync minlines=" . s:sh_minlines . " maxlines=" . s:sh_maxlines syn sync match shCaseEsacSync grouphere shCaseEsac "\<case\>" syn sync match shCaseEsacSync groupthere shCaseEsac "\<esac\>" syn sync match shDoSync grouphere shDo "\<do\>" syn sync match shDoSync groupthere shDo "\<done\>" syn sync match shForSync grouphere shFor "\<for\>" syn sync match shForSync groupthere shFor "\<in\>" syn sync match shIfSync grouphere shIf "\<if\>" syn sync match shIfSync groupthere shIf "\<fi\>" syn sync match shUntilSync grouphere shRepeat "\<until\>" syn sync match shWhileSync grouphere shRepeat "\<while\>" " Default Highlighting: {{{1 " ===================== if !exists("skip_sh_syntax_inits") hi def link shArithRegion shShellVariables hi def link shAstQuote shDoubleQuote hi def link shAtExpr shSetList hi def link shBkslshSnglQuote shSingleQuote hi def link shBkslshDblQuote shDOubleQuote hi def link shBeginHere shRedir hi def link shCaseBar shConditional hi def link shCaseCommandSub shCommandSub hi def link shCaseDoubleQuote shDoubleQuote hi def link shCaseIn shConditional hi def link shQuote shOperator hi def link shCaseSingleQuote shSingleQuote hi def link shCaseStart shConditional hi def link shCmdSubRegion shShellVariables hi def link shColon shComment hi def link shDerefOp shOperator hi def link shDerefPOL shDerefOp hi def link shDerefPPS shDerefOp hi def link shDerefPSR shDerefOp hi def link shDeref shShellVariables hi def link shDerefDelim shOperator hi def link shDerefSimple shDeref hi def link shDerefSpecial shDeref hi def link shDerefString shDoubleQuote hi def link shDerefVar shDeref hi def link shDoubleQuote shString hi def link shEcho shString hi def link shEchoDelim shOperator hi def link shEchoQuote shString hi def link shForPP shLoop hi def link shFunction Function hi def link shEmbeddedEcho shString hi def link shEscape shCommandSub hi def link shExDoubleQuote shDoubleQuote hi def link shExSingleQuote shSingleQuote hi def link shHereDoc shString hi def link shHereString shRedir hi def link shHerePayload shHereDoc hi def link shLoop shStatement hi def link shSpecialNxt shSpecial hi def link shNoQuote shDoubleQuote hi def link shOption shCommandSub hi def link shPattern shString hi def link shParen shArithmetic hi def link shPosnParm shShellVariables hi def link shQuickComment shComment hi def link shBQComment shComment hi def link shRange shOperator hi def link shRedir shOperator hi def link shSetListDelim shOperator hi def link shSetOption shOption hi def link shSingleQuote shString hi def link shSource shOperator hi def link shStringSpecial shSpecial hi def link shSpecialStart shSpecial hi def link shSubShRegion shOperator hi def link shTestOpr shConditional hi def link shTestPattern shString hi def link shTestDoubleQuote shString hi def link shTestSingleQuote shString hi def link shTouchCmd shStatement hi def link shVariable shSetList hi def link shWrapLineOperator shOperator if exists("b:is_bash") hi def link bashAdminStatement shStatement hi def link bashSpecialVariables shShellVariables hi def link bashStatement shStatement hi def link shCharClass shSpecial hi def link shDerefOffset shDerefOp hi def link shDerefLen shDerefOffset endif if exists("b:is_kornshell") || exists("b:is_posix") hi def link kshSpecialVariables shShellVariables hi def link kshStatement shStatement endif if !exists("g:sh_no_error") hi def link shCaseError Error hi def link shCondError Error hi def link shCurlyError Error hi def link shDerefOpError Error hi def link shDerefWordError Error hi def link shDoError Error hi def link shEsacError Error hi def link shIfError Error hi def link shInError Error hi def link shParenError Error hi def link shTestError Error if exists("b:is_kornshell") || exists("b:is_posix") hi def link shDTestError Error endif endif hi def link shArithmetic Special hi def link shCharClass Identifier hi def link shSnglCase Statement hi def link shCommandSub Special hi def link shCommandSubBQ shCommandSub hi def link shComment Comment hi def link shConditional Conditional hi def link shCtrlSeq Special hi def link shExprRegion Delimiter hi def link shFunctionKey Function hi def link shFunctionName Function hi def link shNumber Number hi def link shOperator Operator hi def link shRepeat Repeat hi def link shSet Statement hi def link shSetList Identifier hi def link shShellVariables PreProc hi def link shSpecial Special hi def link shSpecialDQ Special hi def link shSpecialSQ Special hi def link shSpecialNoZS shSpecial hi def link shStatement Statement hi def link shString String hi def link shTodo Todo hi def link shAlias Identifier hi def link shHereDoc01 shRedir hi def link shHereDoc02 shRedir hi def link shHereDoc03 shRedir hi def link shHereDoc04 shRedir hi def link shHereDoc05 shRedir hi def link shHereDoc06 shRedir hi def link shHereDoc07 shRedir hi def link shHereDoc08 shRedir hi def link shHereDoc09 shRedir hi def link shHereDoc10 shRedir hi def link shHereDoc11 shRedir hi def link shHereDoc12 shRedir hi def link shHereDoc13 shRedir hi def link shHereDoc14 shRedir hi def link shHereDoc15 shRedir hi def link shHereDoc16 shRedir endif " Delete shell folding commands {{{1 " ============================= delc ShFoldFunctions delc ShFoldHereDoc delc ShFoldIfDoFor " Set Current Syntax: {{{1 " =================== if exists("b:is_bash") let b:current_syntax = "bash" elseif exists("b:is_kornshell") let b:current_syntax = "ksh" elseif exists("b:is_posix") let b:current_syntax = "posix" else let b:current_syntax = "sh" endif " vim: ts=16 fdm=marker
Save