Override a plugin setting in ftplugin/ directory?

31 views
Skip to first unread message

DwigtArmyOfChampions

unread,
Apr 26, 2020, 1:20:10 PM4/26/20
to vim_use
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?

Paul

unread,
Apr 26, 2020, 2:16:03 PM4/26/20
to vim_use
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.
signature.asc
Reply all
Reply to author
Forward
0 new messages