vim-dirvish
vim-dirvish copied to clipboard
respect b:did_ftplugin
i tried to disable dirvish's default ftplugin/dirvish.vim
by adding let b:did_ftplugin = 1
to stdpath('config')/ftplugin/dirvish.vim
, but it does not work as expected.
idk what you mean by "breaks the sourcing order of ftplugin/dirvish.vim".
I can add support for b:did_ftplugin
.
TODO: from :help ftplugin
:
If you are writing a filetype plugin to be used by many people, they need a
chance to disable loading it. Put this at the top of the plugin: >
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
This also needs to be used to avoid that the same plugin is executed twice for
the same buffer (happens when using an ":edit" command without arguments).
Now users can disable loading the default plugin completely by making a
filetype plugin with only this line: >
let b:did_ftplugin = 1
oh, i was talking to this line which was pointed out by seaseandewar.
I can add support for b:did_ftplugin.
yeah, that's the behavior i am looking for.
i finallly realized how easy can this be fixed :) would you mind to have a look at this pr? @justinmk
after dug deeper, i dont think this is a bug. although this hardcode source
existed since #105, i disabled this source in my fork and used for a couple week, i did not encounter any problems with my keymaps.
i respect this setting and going to close this issue.