" Close the ALEInfo preview window with the q key. noremap q :q! " Explicitly use the default synmaxcol for ale-info. setlocal synmaxcol=3000 function! ALEInfoOpenHelp() abort let l:variable = matchstr(getline('.'), '\v[gb]:ale_[a-z0-9_]+') if !empty(l:variable) execute('help ' . l:variable) endif endfunction " Press space to open :help for an ALE Variable nnoremap :call ALEInfoOpenHelp() let b:undo_ftplugin = get(b:, 'undo_ftplugin', 'execute') let b:undo_ftplugin .= ' | setlocal synmaxcol<' let b:undo_ftplugin .= ' | execute "silent! unmap q"' let b:undo_ftplugin .= ' | execute "silent! nunmap "' let b:undo_ftplugin .= ' | delfunction! ALEInfoOpenHelp'