Sometimes when I make coding mistakes I spend a lot of time finding the error.
Is there a plugin which makes Vim underline or highlight PHP, HTML or CSS mistakes?
For instance:
<?php
foreach ($row as $r) {
<echo '<h1>' . $r->title . '</h1>';
}
?>
The '<' before echo will be highlighted in red.
Vim has HTML correction but I need for PHP and CSS.
There is plugin for Vim, developed by the infamous scrooloose, called Syntastic that does exactly what you are looking for. It is described as:
The syntax checker is extended with language plugins and there just so happens to be one for PHP as well as HTML, although I’m not positive about CSS at the moment. Either way, as soon as you open a file or attempt to save one that has syntax errors, you can set up Syntastic to alert you in various ways:
Be sure to check out the helpdoc as there is a ton of useful info in there.
https://github.com/scrooloose/syntastic