On Tue, October 18, 2011 4:05 pm, Paul Connolley wrote:
> I'm having an issue with a syntax plugin
> (https://github.com/pangloss/vim-javascript) running 'setlocal
> iskeyword+=$' when I edit a PHP file. It doesn't happen when I open
> any other file type (eg. .vimrc).
>
> I was wondering if it was to do with my .vimrc or conflicting
> plugins so I created a fresh .vimrc file and .vim directory and
> installed the plugin and added the following to my .vimrc:
>
> https://gist.github.com/1295121
>
> It still seems to run setlocal from the syntax/javascript.vim.
>
> As a test, I did: :set ft=php within my .vimrc and it applied
> setlocal iskeyword+=$ as well
>
> I can't see any reason why a javascript syntax file would be loaded
> for PHP files.
>
> Does anyone have any clues? Have I done something wrong or is it
> something that the plugin has done?

You can use :verbose set isk? to find out where it was last set.  You
can also check using :scriptnames, that the javascript.vim file is
really sourced when editing a php file.

My feeling is, that the php syntax file also loads the javascript file
(either directly or indirectly via loading the html syntax file) which
sets setl isk+=$

I don't think, the javascript syntax file should set this option
anyways, so I'll report that as a bug to the maintainer of the
mentioned filetype plugin. (Plus, the mentioned javascript.vim syntax
file doesn't even appear to use the '\k' pattern which makes use of
the 'iskeyword' setting so I don't really understand, why the syntax
script sets this option).

If the maintainer really needs this option, I think it should be moved
to a ftplugin/javascript.vim file.

regards,
Christian

-- 
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

Reply via email to