On 8/7/06, Benji Fisher <[EMAIL PROTECTED]> wrote:
On Sat, Aug 05, 2006 at 02:24:45PM -0400, JStrom wrote:
>
> Recently though, I noticed that the PHP formatting also uses the HTML
> formatting code, and I do like PHP's smart-indentation. Is there some
> way I can tell vim to bring the indentation settings back alive within
> the <?php ... ?> tags?
Let me take this opportunity to try once again to drum up support
for an idea that I have proposed before. IMO it is too restrictive to
make options (such as syntax highlighting, 'textwidth', and
indent-related options) apply to a whole file. There should be a
convenient, consistent way to tell vim to treat different sections of a
file as having different file types. Examples:
* code snippets in an e-mail
* PHP in an HTML file (or vice-versa)
* perl/python/ruby inside a vim script
* comments, text, and math inside LaTeX/plain TeX/conTeXt
True. I use perl -e perl scripts embedded into shell scripts,
and I am missing perl syntax inside shell scripts. OTOH,
it is possible in vim. What is missing here is some doc
section in the syntax.vim doc. Doc sestion that'd describe
the official recommended method of embedding one syntax
(filetype) into another; like
php syntax includes the html syntax.
Yakov