From 01315262615eb3b111f05ea3e199d16663e5a901 Mon Sep 17 00:00:00 2001 From: w0rp Date: Tue, 14 Feb 2017 23:45:22 +0000 Subject: [PATCH] #254 Add a command for copying ALEInfo to your clipboard quickly --- autoload/ale/debugging.vim | 8 ++++++++ plugin/ale.vim | 2 ++ 2 files changed, 10 insertions(+) diff --git a/autoload/ale/debugging.vim b/autoload/ale/debugging.vim index bbe546d..737a90d 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 7074e46..13cbdce 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() " mappings for commands nnoremap (ale_previous) :ALEPrevious