Hello Vu,

I don't know the indenting features very well, but I can tell you:

1)  I'm not sure that lines are indented after '<?php' automatically.
    Try typing a longer script with thinks like 'if()' and 'foreach()',
    because they *are* indented.

2)  you probably need to use
      :set smartindent
      :set autoindent
    in your _vimrc file so Vim will add the indenting after 'if', 'while',
    'foreach' as you type.

3)  If you have syntax coloring turned on, your PHP will be in color.
    (Assuming you aren't using Vim through a command prompt.) You can
    use 'syntax on' to be sure.


regards,
Peter




--- Vu The Cuong <[EMAIL PROTECTED]> wrote:

> I'm very sorry but could you tell me how to indent *.php file in vim7?
> I'm using winXP. I created test.php file, open it and type <?php then
> hit Enter
> But it not indent at all.
> Do I need to setup something?
> 
> The pgp indent file (php.vim) of vim 7 is here:
> http://www.vim.org/scripts/script.php?script_id=1120 
> 
> About install method, it said that:
> 
> "PHP syntax coloring must be turned on. "
> 
> How can I know that my vim7 already have PHP syntax turned on?
> 
> Do I must put "syntax on" into vim7 _vimrc?
> 
> Please help me. I need your help.
> 
> THanks in advanced.
> 



                
____________________________________________________ 
Do you Yahoo!? 
Check out gigs in your area on the comprehensive Yahoo! Music Gig Guide 
http://au.music.yahoo.com/gig-guide

Reply via email to