Print to `stdout`
Request: some way to print the current buffer to stdout, so I can insert micro into a pipe (x | micro | y) and edit the input before I pass it to y.
This is not a feature for the text editor itself, you should use an external tool like vipe from moreutils which allows you to pipe text through any editor.
This is not a feature for the text editor itself, you should use an external tool like
vipefrom moreutils which allows you to pipe text through any editor.
That definitely looks interesting, but unfortunately I can't set vipe to be my default $EDITOR.
That definitely looks interesting, but unfortunately I can't set vipe to be my default
$EDITOR.
You're not supposed to set vipe as your editor, vipe looks up the value of $EDITOR environment variable to pick the editor to use. So you would use it like this:
$ command1 | EDITOR=micro vipe | command2
# or, if you already have $EDITOR set to micro in your shell configuration files:
$ command1 | vipe | command2
You're not supposed to set vipe as your editor, vipe looks up the value of
$EDITORenvironment variable to pick the editor to use.
Sorry, to clarify, what I meant is that my use case involves another shell script (written by someone else) piping something to my $EDITOR, and then I want to use the output of that script in something else. In that scenario, I don't have the ability to call vipe myself.