Saturday, November 30, 2013

Re: how to make vim read local configuration files

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.

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.

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.

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.

No comments:

Post a Comment