summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2018-04-08 19:04:07 +0100
committerw0rp <devw0rp@gmail.com>2018-04-08 19:04:07 +0100
commit7cf3ddf6c4354db406a19104f352565d42a827d2 (patch)
treee9cf7c8d3fffaf2f12abe0d86305744591fbd717 /autoload
parent1123669839c1656deb20f433fc672ca0abdda705 (diff)
downloadale-7cf3ddf6c4354db406a19104f352565d42a827d2.zip
Close #1439 - Add an :ALEInfoToFile command
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/debugging.vim11
1 files changed, 11 insertions, 0 deletions
diff --git a/autoload/ale/debugging.vim b/autoload/ale/debugging.vim
index cb93ec16..bcfd467d 100644
--- a/autoload/ale/debugging.vim
+++ b/autoload/ale/debugging.vim
@@ -211,3 +211,14 @@ function! ale#debugging#InfoToClipboard() abort
call s:Echo('ALEInfo copied to your clipboard')
endfunction
+
+function! ale#debugging#InfoToFile(filename) abort
+ let l:expanded_filename = expand(a:filename)
+
+ redir => l:output
+ silent call ale#debugging#Info()
+ redir END
+
+ call writefile(split(l:output, "\n"), l:expanded_filename)
+ call s:Echo('ALEInfo written to ' . l:expanded_filename)
+endfunction