I'm using https://github.com/w0rp/ale plugin. But it makes vim less responsive... I have a bind for ALETooggle
on <leader>l
.
It would be nice to have it disabled by default and enable by keyboard shortcut when wanted, I tried to put ALEDisable
on my .vimrc
but it gives me the error below
Error detected while processing /Users/daniel/.vimrc:
line 94:
E492: Not an editor command: ALEDisable
Press ENTER or type command to continue
Here is a sample .vimrc
that would trigger the problem
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
Plugin 'w0rp/ale'
call vundle#end() " required
filetype plugin indent on " required
noremap <leader>l :ALEToggle<CR>
ALEDisable
A: The best way I know of to stop an ale fermentation is to crash cool the beer; that is, chill it to 32 °F (0 °C) as quickly as possible. This method will stop most ale yeast in their tracks, and it usually works on lager yeast too, if you do it quickly enough.
ALE (Asynchronous Lint Engine) is a plugin for providing linting in NeoVim 0.2. 0+ and Vim 8 while you edit your text files. ALE makes use of NeoVim and Vim 8 job control functions and timers to run linters on the contents of text buffers and return errors as text is changed 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With