usando il plugin PHP-correct-Indenting, reperibile a questo indirizzo:
http://www.vim.org/scripts/script.php?script_id=1120
ma non capisco come attivarlo rispetto alle impostazioni che già ho
in .vimrc, e che sono le seguenti:
Codice: Seleziona tutto
" ============================= PHP =========================================
:let g:PHP_autoformatcomment = 0 " to not enable auto-formating
" of comments by default (if you want
" to use your own 'formatoptions')
autocmd FileType php set formatoptions=tcq textwidth=78 " for all .php files
" formatoptions=t auto-wrap text using textwidht
" formatoptions=c auto-wrap comments using textwith
" formatoptions=q allow formatting of comments with "gq"
:let g:PHP_BracesAtCodeLevel = 1 " to indent braces at the same level
" than the code they contain:
map <C-B> :!php -l %<CR> " runtime syntax check for php
Come posso fare?
grazie
m