Closed XVilka closed 4 years ago
I tried this it works for me:
call plug#begin()
if !exists('g:vimpager.enabled')
Plug 'dense-analysis/ale'
endif
call plug#end()
Can you put your whole .vimrc
in a gist please?
@rkitover here you go: https://gist.github.com/XVilka/995951e3f2ee6e991b900675d9d59696
I figured out the problem, my documentation is wrong and I will fix it shortly.
Where you have the line:
let g:vimpager = {}
change it to:
if !exists('g:vimpager')
let g:vimpager = {}
endif
Then when loading the ale plugin, use the above code:
if !exists('g:vimpager.enabled')
Plug 'dense-analysis/ale'
endif
I use both Ale and VIM pager plugins. For obvious reasons I want to disable some Vim features and plugins in the "less" mode.
But if I put as recommended this piece of code in my
~/.vimrc
it still starts Ale:And if I start vimpager with
vimpager some_file.py
it will still show Ale error and warning messages. Some people suggest to use separate file for pager~/.vimpagerrc
, but I don't want to copy part of~/.vimrc
in it for obvious de-syncronisation issues. So I want to share the same configuration for both modes, just disable some plugins - in this case it is Ale.Asked also on StackExchange but haven't got any useful answer https://vi.stackexchange.com/questions/20708/how-to-disable-ale-if-pager-mode-is-enabled
Even if I put Plug declaration under this condition, it will still load the Ale in the pager mode:
See also https://github.com/dense-analysis/ale/issues/2714