On 8/5/06, Yakov Lerner <[EMAIL PROTECTED]> wrote:
On 8/5/06, JStrom <[EMAIL PROTECTED]> wrote:
> I don't like having the indentation running when I work on HTML files
> (once I get a few elements deep it's a real pain to work with) so I
> tried disabling this functionality. I eventually added the following to
> my html.vim file:
> set noai
> set nocin
> set noci
> set nosi
> set nopi
> set indentexpr=
> set indentkeys=
> which (somewhat inelegantly) solved the problem.
>
> 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?
Must be possible using CursorMoves autoevent, except
that I don't see in syntax/html.vim how <?php ... ?> is handled.
Is is indeed in syntax /html.vim ?
Looks like it is not easy to do this way because vi does
not have function to check whether syntax region is in
the stack of sytaxes enclosing the cursor.
Easier solution is to modify indent/php.vim,
because indent/php.vim already checks for <?php and ?>,
or to ask script maintainer (look into indent/php.vim) to add
such option for you.
Yalpv