Fix #757 - Show :ALEDetail messages in a window

This commit is contained in:
w0rp
2017-11-14 23:25:01 +00:00
parent 6b2c61a5cc
commit d48506f9c1
4 changed files with 36 additions and 12 deletions

18
autoload/ale/preview.vim Normal file
View File

@@ -0,0 +1,18 @@
" Author: w0rp <devw0rp@gmail.com>
" Description: Preview windows for showing whatever information in.
" Open a preview window and show some lines in it.
function! ale#preview#Show(lines) abort
silent pedit ALEPreviewWindow
wincmd P
setlocal modifiable
setlocal noreadonly
setlocal nobuflisted
setlocal filetype=ale-preview
setlocal buftype=nofile
setlocal bufhidden=wipe
:%d
call setline(1, a:lines)
setlocal nomodifiable
setlocal readonly
endfunction