summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-02-14 23:45:22 +0000
committerw0rp <devw0rp@gmail.com>2017-02-14 23:45:22 +0000
commit01315262615eb3b111f05ea3e199d16663e5a901 (patch)
tree6297397e2c1b2e66f5fc7fc97dbad978c9ea0a9a
parented370667c8f45a349ed76e4283593b13cfe68c44 (diff)
downloadale-01315262615eb3b111f05ea3e199d16663e5a901.zip
#254 Add a command for copying ALEInfo to your clipboard quickly
-rw-r--r--autoload/ale/debugging.vim8
-rw-r--r--plugin/ale.vim2
2 files changed, 10 insertions, 0 deletions
diff --git a/autoload/ale/debugging.vim b/autoload/ale/debugging.vim
index bbe546d6..737a90d7 100644
--- a/autoload/ale/debugging.vim
+++ b/autoload/ale/debugging.vim
@@ -107,3 +107,11 @@ function! ale#debugging#Info() abort
echom ''
call s:EchoCommandHistory()
endfunction
+
+function! ale#debugging#InfoToClipboard() abort
+ redir @+>
+ silent call ale#debugging#Info()
+ redir END
+
+ echom 'ALEInfo copied to your clipboard'
+endfunction
diff --git a/plugin/ale.vim b/plugin/ale.vim
index 7074e468..13cbdce6 100644
--- a/plugin/ale.vim
+++ b/plugin/ale.vim
@@ -199,6 +199,8 @@ command! ALEToggle :call s:ALEToggle()
" Define command to get information about current filetype.
command! ALEInfo :call ale#debugging#Info()
+" The same, but copy output to your clipboard.
+command! ALEInfoToClipboard :call ale#debugging#InfoToClipboard()
" <Plug> mappings for commands
nnoremap <silent> <Plug>(ale_previous) :ALEPrevious<Return>