How to disable ale plugin by default in Vim?
The ALE plugin provides an option named g:ale_enabled
to disable ALE by default, so this way is plugin manager agnostic.
If you set g:ale_enabled
to 0
then ALE is disabled for any buffer.
Also the plugin provides an option to control ALE availability based on file name.
Here is an example found with :h g:ale_enabled
:
" Disable linting for all minified JS files.
let g:ale_pattern_options = {'\.min.js$': {'ale_enabled': 0}}
You can enable ALE using :ALEEnable
or :ALEToggle
when you want to enable it.
The most elegant solution is to use a better plugin manager like Plug or Dein. Why? Because they're well maintained and much more faster and efficient than the current plugin manager you use. And most importantly they support lazy loading of plugins with ease.
For your purpose of loading the plugin on map, you can do either of these :
Plug 'w0rp/ale', { 'on': 'ALEToggle' }
or
call dein#add('w0rp/ale',{'on_cmd': 'ALEToggle'})
the same lazy loading maybe possible with vundle too i guess, but believe me, it's worth using either vim-plug or dein, cause they're super fast and intuitive.