Hello,
I just have found a neat way for doing:
:echo system('command')
I attach a small plugin which does the above if the command line starts
with ':! '. If you know of any existing such plugin let me know, if not
I'll be happy to publish it on
vim.org. Here are doc notes from the
plugin:
" This is a tiny vim script which might have been discvered ages ago (but I am
" unaware). Its rather for vim than gvim users.
"
" When executing commands from vim you enter a vim shell where you see the
" output. In many situations this is not what you want and you'd prefere
" :call system("command")
" but it is a lot to type, and you don't have completion. With this snipet
" every command which start with:
" :! command
" a space after the "!" will be wrapped into system() and the output will be
" echoed.
" The executed command will also be echoed (on the very top).
"
" Benefits: you get completion for system commanads and system files.
" Drawbacks: I'll be happy to know any of them :)
"
" The idea how to do that was borrowed from emacscommandline plugin.
Any suggestions for the plugin name will be welcome.
Best regards,
Marcin