Saturday, November 30, 2013

Re: how to make vim read local configuration files


On Nov 30, 2013 10:15 PM, "Marc Weber" <marco-oweber@gmx.de> wrote:
>
> Excerpts from Mauro Sacchetto's message of Sat Nov 30 19:06:28 +0100 2013:
> > to read the system configuration files placed in
> > /usr/share/vim/addons/ftplugin/latex-suite/ and in
> > /var/lib/vim/addons/ftplugin/latex-suite.
> > how can i suggest vim to read my local files?
> Well - its bad habit to install plugins "system wide" for that reason
> eventually.

Unless you are going to modify files it makes no difference. It *may* be bad (really not bad, but annoying) habit to install plugins in multiple ways, but I see nothing bad in using only one variant.

>
> Many ftplugin files have a b:did_ftplugin setting, you should set it in
> your custom file to prevent the system wide to take any action.

There is no latex-suite filetype: besides the location these files are *not* filetype plugins.

>
> Typical guards look like this:
>
>   if exists('b:did_ftplugin')
>     finish
>   endif
>   let b:did_ftplugin = 1
>
> Another way is to "override" settings by using ~/.vim/after/ftplugin/*
> which should be loaded last.

This is not going to work: latex-suite authors do not use FileType event to load plugins thus ftplugin/latex-suite may be just as well named macros/latex-suite since it is loaded by :source or :runtime (the fact that OP files were not loaded suggests they are either named not like files in ftplugin/latex-suite or :source is used).

>
> Marc Weber
>
> --
> --
> 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/groups/opt_out.

--
--
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/groups/opt_out.

No comments: