Override a plugin setting in ftplugin/ directory?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Override a plugin setting in ftplugin/ directory?

DwigtArmyOfChampions
I’m using Vim 7. I downloaded and enabled a plugin that enhances syntax for drupal files. In the ftplugin/drupal.vim file of the plugin, I see the following code:

if &ft =~ ‘\<php\>’

  setl no ignorecase

endif


I don’t personally care for noignorecase, so I would like to override that particular setting with “set ignorecase”. How do I do that? If I run :scriptnames on a  Drupal file, I see that this file gets executed much later than my .vimrc file, so I don’t think I can use .vimrc for this. While I could edit the actual ftplugin/drupal.vim file itself, that creates an inconsistency between the original version and my version, so if the original programmer releases an updated version, I will have to make this same change all over again. What is the correct way to fix this?

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/d4e64d8b-b3a0-453d-a5a0-271b2d20733a%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Override a plugin setting in ftplugin/ directory?

Paul-7
On Sun, Apr 26, 2020 at 10:20:10AM -0700, DwigtArmyOfChampions wrote:
>I don’t personally care for noignorecase, so I would like to override that particular setting with “set ignorecase”. How do I do that? If I run :scriptnames on a  Drupal file, I see that this file gets executed much later than my .vimrc file, so I don’t think I can use .vimrc for this. While I could edit the actual ftplugin/drupal.vim file itself, that creates an inconsistency between the original version and my version, so if the original programmer releases an updated version, I will have to make this same change all over again. What is the correct way to fix this?

Put it in ~/.vim/after/ftplugin/php.vim (or drupal.vim, if that's how that plugin works). Files in the after directory get sourced later. See :help after-directory.

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200426181554.GA22923%40rainslide.net.

signature.asc (817 bytes) Download Attachment