spf13 / PIV

PHP Integration environment for Vim
250 stars 36 forks source link

Syntax clearing issue #3

Closed has2k1 closed 12 years ago

has2k1 commented 13 years ago

Opening the first php file leads to a clear out of almost all the extra syntax settings set by other plugins. e.g. minibufexp, nerdtree(if NERDTreeQuitOnOpen is not set), easymotion, ...

Some of those plugins reload their syntax whenever their visibility is toggled on, others don't which handicaps the whole session as far as the later plugins are concerned.

This is the case because syntax on clears the syntax then loads only the buffer's filetype syntax file. Hence all other non filetype buffer windows lose their syntax. Solution: Check if syntax is enabled before enabling it at ftplugin/php.vim line 75

if !exists("g:syntax_on") | syntax on | endif

The same issue is present when vimrc is resourced because of .vimrc line 40.

spf13 commented 13 years ago

Thanks. Would you like to submit a pull request with this fix?

has2k1 commented 13 years ago

Submitted one.

Plus, I found the php syntax file to be a regression from the system default save the php 5.3 ability. So many keyword groups are mixed which misleads the colorscheme.

I played about with it. Check out my current diff.