Reputation: 193
Janus is good piece of pre-configured ViM [and its plugins]. There are two different hooks .vimrc.before which runs before Janus is loaded, and .vimrc.after which runs after Janus is loaded but before any plugins are loaded.
All seems fine, but I couldn't find a way/place to add plugin-specific configuration. For instance, I'd like to use rails.vim's Rnavcommand to add various navigation commands like "Rpresenter", "Ruploader", etc.,
Rnavcommand presenter app/presenters
I couldn't do this in .vimrc.after because rails.vim is not loaded by the time this file gets executed.
Upvotes: 1
Views: 931
Reputation: 196886
Janus's plugin-specific settings are in janus/vim/tools/janus/after/plugin/
. I have no idea where they are once the whole thing is installed.
But I feel the need to say Drop Janus. Using your own ~/.vimrc
and installing your plugins yourself is not that hard or time consuming and one of the benefits is that you actually know where, how and why things are how they are.
Upvotes: 3
Reputation: 172768
When a plugin hasn't yet been loaded, but you need its functionality (e.g. to define custom commands based on it), you can always explicitly source the plugin script, and then do the definition after that:
:runtime plugin/rails.vim
:Rnavcommand presenter app/presenters
The canonical include-guard which is / should be included in all plugins avoids that the plugin is re-defined when it is later sourced again as part of the regular initialization sequence.
Alternatively, the after directories are meant for stuff that need to run after a dependent script. I don't know / don't recommend using distributions like Janus, but assuming the Rails plugin is located at ~/.janus/rails/plugin/rails.vim
, the corresponding after location would be ~/.janus/rails/after/plugin/rails.vim
.
Upvotes: 0