I want to pipe the selected text to a shell command and receive the one-line output from this shell command on the vim info/command line?
What I\'m really trying to
Another answer:
function Pastebin() range
let savedreg=@"
silent execute a:firstline.",".a:lastline."yank"
python import vim, subprocess
python p=subprocess.Popen(["pastebin"], stdin=subprocess.PIPE, stdout=subprocess.PIPE)
python p.stdin.write(vim.eval('@"'))
let @"=savedreg
python p.stdin.close()
python retstatus=p.poll()
python print p.stdout.read()
endfunction
Requires python support. Use it just like matias' function.