I'm using Vim 7.4. I have the following code in my ~/.vim/after/php.vim file:
" Just a hello message.
echomsg "Hello world!"
" Add heredoc syntax to CSS code in a php file.
syn region phpHereDoc matchgroup=Delimiter
\ start="\(<<<\)\@<=\(\"\=\)\z(\(\I\i*\)\=\(css\)\c\(\i*\)\)\2$"
\ end="^\z1\(;\=$\)\@="
\ contained
\ contains=@htmlCss, phpIdentifierSimply, phpIdentifier, phpIdentifierComplex, phpBackslashSequences, phpMethodsVar, @Spell
\ keepend extend
If I create a file vim hello.php, how do I make sure that Vim will run this code? I've confirmed that ~/.vim/after is in my runtimepath, but I still am not getting the extra syntax highlighting or the "Hello world" echo message. And if I run the :scriptnames command, the file does not show up on the list. What am I missing?