Is there a way to have different (see below) syntax highlighting for
different portions of a file?
What I am interested in knowing is whether there exists a meta file
format (say multisyn) which highlights different portions of a file
with syntax corresponding to that portion.
For instance, let the file multisyn.cat be the following-
Start of multisyn.cat
+++++++++++++++++++++++++++
#!/usr/bin/perl
print "Hello world\n";
foreach $i ( 1 .. 10 ){
print $i,"\n";
}
+++++++++++++++++++++++++++
#!/bin/tcsh
set hello = "world";
echo $hello
+++++++++++++++++++++++++++
End of multisyn.cat
What I would like is that each portion of multisyn.cat be highlighted
with a different syntax corresponding to that portions file marked by
the #!/usr/... indicator. For instance, I would like the first portion
to be highlighted using the perl syntax and the second portion be
highlighted using the tcsh syntax.
If there doesn't exist one, would it be possible to create a new file
type called say multisyn and write a syntax which does the job? Is it
possible?
Thanks,
Krishna