views:

91

answers:

1
+6  A: 

see the vim help: :help spell-syntax

You can define particular syntax groups as having spell checking.

There's probably a better way to do it (using a ~/.vim/after/syntax/php.vim file?), but a simple hack is to make a personal version of the php syntax file in ~/.vim/syntax (you can do this by doing :e $VIMRUNTIME/syntax/php.vim and the :saveas ~/.vim/syntax/php.vim), and change all instances of the text contains=@phpAddStrings to contains=@Spell,@phpAddStrings. Next time you open a php file, turn on spell checking as normal with :set spell.

Michael Dunn
Thanks, that worked a treat.
Ollie