Vu The Cuong 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.
1. Type
:filetype
Vim should answer:
filetype detection:ON plugin:ON indent:ON
2. Hit F1. The helpfile should be displayed in color. If it isn't, then
you haven't got syntax highlighting (either because syntax is not turned
on, or because filetype detection isn't enabled). Enter ":q" (without
the quotes) to close the help window.
To set filetype detection and indenting (if the answer to 1 is wrong), use
:filetype plugin indent on
To set syntax highlighting (if the helpfile is displayed in
black-and-white), use
:syntax on
You can also set both filetype indenting _and_ syntax highlighting by using
:runtime vimrc_example.vim
instead of the ":filetype" and ":syntax" commands above. Place this
command near the top of your vimrc (before everything except a
":language" command if you have one) so that it won't override your own
favourite settings.
Best regards,
Tony.