summaryrefslogtreecommitdiff
path: root/ftplugin/ale-info.vim
diff options
context:
space:
mode:
Diffstat (limited to 'ftplugin/ale-info.vim')
-rw-r--r--ftplugin/ale-info.vim16
1 files changed, 16 insertions, 0 deletions
diff --git a/ftplugin/ale-info.vim b/ftplugin/ale-info.vim
new file mode 100644
index 00000000..65913a76
--- /dev/null
+++ b/ftplugin/ale-info.vim
@@ -0,0 +1,16 @@
+" Close the ALEInfo preview window with the q key.
+noremap <buffer> q :q!<CR>
+
+" 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 <buffer> <silent> <space> :call ALEInfoOpenHelp()<CR>