On Wed, Oct 14, 2015 at 6:20 PM, Gary Johnson <[email protected]> wrote: > On 2015-10-14, Peng Dai wrote: >> I used vundle.vim to manage my plugin now. And I write my own conf >> in the vimrc. >> >> I now want to write all my own-conf tobe a vim-plugin, which will >> be hosted on the github and be installed by Vundle.vim. >> >> I have to do somethings before all others plugins loading, for >> example set other plugins options. >> I also need to do somethings after all others plugin loaded. for >> example my own keymapping, :set cmd. >> >> I cant set my plugin at the last of runtimepath, and put my >> keymap-config in the after directory. >> But I really do not know how to do things before other plugins. >> cause there is no before directory at all. > > The standard subdirectories of ~/.vim, such as ~/.vim/ftplugin, are > fine for sourcing your own plugins before the standard plugins are > sourced from $VIMRUNTIME, but if you use the standard subdirectories > of ~/.vim to contain plugins contributed by others, you are left > with no place to put your own plugins that you want to be sourced > before those contributed plugins. For that, a ~/.vim/before > directory would be perfect. So I created one and put it in my > 'runtimepath': > > let &rtp = $HOME."/.vim/before,".&rtp > > It works quite well. > > Regards, > Gary
OTOH, you could regard "plugins contributed by others" as being halfway between "those installed by Vim itself" and "your own", and put them in subdirectories of $VIM/vimfiles/. Of course, if there are several people logging in to that system, each with his/her own account, they would all see these "third-party plugins". You could see that as an advantage or a disadvantage depending on your particular setting; or if you're the only user, visibility to other accounts wouldn't matter. Best regards, Tony. -- -- You received this message from the "vim_dev" 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_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
