On Thu, May 3, 2012 at 11:49 PM, Gary Johnson <garyjohn@spocom.com> wrote:
> On 2012-05-03, Dotan Cohen wrote:
>> On Thu, May 3, 2012 at 10:34 PM, Ben Fritz wrote:
>> > It shouldn't, without a syntax/php.vim file somewhere. As noted,
>> > this file is only sourced as-needed; is the output of the
>> > :scriptnames command you gave from a Vim with the php file
>> > loaded and syntax highlighting on as you describe? In that Vim,
>> > what does this command say?
>> >
>>
>> The PHP syntax is probably being sourced from whatever the default is
>> in /etc or /usr
>>
>> > :verbose set syntax? filetype?
>> >
>>
>> syntax=php
>> Last set from /usr/share/vim/vim73/syntax/syntax.vim
>> filetype=php
>> Last set from /usr/share/vim/vim73/filetype.vim
>
> Neither of those files was in the :scriptnames output that you
> posted originally.
>
> 1: /usr/share/vim/vimrc
> 2: /usr/share/vim/vim73/debian.vim
> 3: /usr/share/vim/vim73/syntax/syntax.vim
> 4: /usr/share/vim/vim73/syntax/synload.vim
> 5: /usr/share/vim/vim73/syntax/syncolor.vim
> 6: /usr/share/vim/vim73/filetype.vim
> 7: /home/dotancohen/.vimrc
> 8: /home/dotancohen/.vim/keymap/insert-only_capslock.vim
> 9: /home/dotancohen/.vim/plugin/taglist.vim
> 10: /usr/share/vim/vim73/plugin/getscriptPlugin.vim
> 11: /usr/share/vim/vim73/plugin/gzip.vim
> 12: /usr/share/vim/vim73/plugin/matchparen.vim
> 13: /usr/share/vim/vim73/plugin/netrwPlugin.vim
> 14: /usr/share/vim/vim73/plugin/rrhelper.vim
> 15: /usr/share/vim/vim73/plugin/spellfile.vim
> 16: /usr/share/vim/vim73/plugin/tarPlugin.vim
> 17: /usr/share/vim/vim73/plugin/tohtml.vim
> 18: /usr/share/vim/vim73/plugin/vimballPlugin.vim
> 19: /usr/share/vim/vim73/plugin/zipPlugin.vim
> 20: /home/dotancohen/.vim/after/plugin/matchparen.vim
> 21: /usr/share/vim/vim73/scripts.vim
> Press ENTER or type command to continue
>
> That means that they were sourced AFTER you executed that
> :scriptnames command but BEFORE you executed
>
> :verbose set syntax? filetype?
>
> So try the :scriptnames command again but this time AFTER you open a
> PHP file.
>
Apparently I erred, I apologise for driving everyone crazy. Here is
the :scriptfiles output for a PHP file:
1: /usr/share/vim/vimrc
2: /usr/share/vim/vim73/debian.vim
3: /usr/share/vim/vim73/syntax/syntax.vim
4: /usr/share/vim/vim73/syntax/synload.vim
5: /usr/share/vim/vim73/syntax/syncolor.vim
6: /usr/share/vim/vim73/filetype.vim
7: /home/dotancohen/.vimrc
8: /home/dotancohen/.vim/keymap/insert-only_capslock.vim
9: /home/dotancohen/.vim/plugin/taglist.vim
10: /usr/share/vim/vim73/plugin/getscriptPlugin.vim
11: /usr/share/vim/vim73/plugin/gzip.vim
12: /usr/share/vim/vim73/plugin/matchparen.vim
13: /usr/share/vim/vim73/plugin/netrwPlugin.vim
14: /usr/share/vim/vim73/plugin/rrhelper.vim
15: /usr/share/vim/vim73/plugin/spellfile.vim
16: /usr/share/vim/vim73/plugin/tarPlugin.vim
17: /usr/share/vim/vim73/plugin/tohtml.vim
18: /usr/share/vim/vim73/plugin/vimballPlugin.vim
19: /usr/share/vim/vim73/plugin/zipPlugin.vim
20: /home/dotancohen/.vim/after/plugin/matchparen.vim
21: /usr/share/vim/vim73/syntax/php.vim
22: /usr/share/vim/vim73/syntax/html.vim
23: /usr/share/vim/vim73/syntax/javascript.vim
24: /usr/share/vim/vim73/syntax/vb.vim
25: /usr/share/vim/vim73/syntax/css.vim
26: /usr/share/vim/vim73/syntax/sql.vim
27: /usr/share/vim/vim73/syntax/sqloracle.vim
28: /home/dotancohen/.vim/after/syntax/php.vim
29: /usr/share/vim/vim73/scripts.vim
30: /usr/share/vim/vim73/syntax/help.vim
I see that ~/.vim/after/syntax/php.vim is in there. However, the +=
string is certainly not being highlighted as error. Here is the
content of the ~/.vim/after/syntax/php.vim file:
scriptencoding utf-8
setlocal nolist
syn match phpPlusEq '+='
hi link phpPlusEq Error
I also tried with a keyword definition instead of match, this did not
work to highlight += either:
scriptencoding utf-8
setlocal nolist
syn keyword phpPlusEq +=
highlight phpPlusEq term=reverse ctermfg=black ctermbg=yellow
guifg=black guibg=yellow
--
Dotan Cohen
http://gibberish.co.il
http://what-is-what.com
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Thursday, May 3, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment