Wednesday, November 5, 2014

Re: Autocommand vs ftplugin


On Nov 5, 2014 6:49 PM, "Gary Johnson" <garyjohn@spocom.com> wrote:
>
> On 2014-11-05, Matteo Riva wrote:
> > On Wed, Nov 5, 2014 at 7:54 PM, Christian Brabandt wrote:
> >
> > > Do you actually have a line :filetype on or similar in your .vimrc?
> >
> > Yes I do, and I could verify that the ftplugin file is executed (I set
> > a custom variable and it shows when opening the file)
>
> The php_folding variable controls the behavior of the syntax/php.vim
> file, not the ftplugin/php.vim file.  Also, if you have
>
>     syntax on
>
> in your ~/.vimrc before
>
>     filetype plugin on
>
> then syntax/php.vim will be sourced before ftplugin/php.vim or
> after/ftplugin/php.vim.
>
> You can see which files are sourced and in what order by executing
>
>     :scriptnames
>
> This is easier than putting special variables in your plugins.
>
> You could solve the problem by putting those :let commands in
> ~/.vim/syntax/php.vim or by putting "filetype plugin on" ahead of
> "syntax on" in your ~/.vimrc.
>
> Regards,
> Gary
>

You could execute :verbose set foldlevel? (with the question mark) and it'll tell you where it was set last. Might give you an idea about what's clobbering your setting.

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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: