Is there a way to get basic PHP error underlining in VIM?

ide, php, vim

Solution

Use Syntastic

To make it work efficiently you can add this one small customization to your `.vimrc`:

function! s:SaveAll()
    w | :Error
endfunction
command! -bar -narg=0 W call s:SaveAll()

now using `:W` for saving your file will also show a location list with any errors.

Problem

I really like VIM but one thing I cannot do without is simple error underlying like in netbeans and Visual Studio. I often make silly mistakes like ``` if checkit($url) { } ``` instead of ``` if (checkit($url)) { } ``` The little squiggly red underline is a lifesaver when it comes to stuff like that. Is there a plugin for VIM that will save me from php silly mistake hell? Thanks.

Original source