vimwiki

Personal wiki for vim
git clone https://github.com/vimwiki/vimwiki.git
Log | Files | Refs | README | LICENSE

commit f18bb6bc5719159c4a7c31718b60eff68f12797f
parent 7ad0ad36dcf66284944852a955386fe5117686d4
Author: Rane Brown <rane.brown@gmail.com>
Date:   Sat, 21 Dec 2019 09:10:39 -0700

Add function to print a command output to the buffer

Diffstat:
Mtest/vader_includes/vader_setup.vader | 14+++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/test/vader_includes/vader_setup.vader b/test/vader_includes/vader_setup.vader @@ -67,8 +67,20 @@ Before (Define functions): " Write current file: helper to hide `set bt=` function! WriteMe() - set bt= + set buftype= write % endfunction + " print a command output to the buffer + function! PrintCommand(cmd) + redir => message + silent execute a:cmd + redir END + if empty(message) + Log 'no output' + else + silent put=message + endif + endfunction + # vim: ft=vim