How can I redirect output from stdout into vim?
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
I would like to view the output of echo
in vim, and save to a file after having a look at it. I have tried echo $PATH | vim
, but I get the following error:
Vim: Warning: Input is not from a terminal
Vim: Error reading input, exiting...
Vim: Finished.
What can I do?
vim pipe stdout
add a comment |Â
up vote
2
down vote
favorite
I would like to view the output of echo
in vim, and save to a file after having a look at it. I have tried echo $PATH | vim
, but I get the following error:
Vim: Warning: Input is not from a terminal
Vim: Error reading input, exiting...
Vim: Finished.
What can I do?
vim pipe stdout
askubuntu.com/questions/510890/â¦
â bertieb
1 hour ago
Possible duplicate of Read from stdin to new, named, file in vim
â bertieb
1 hour ago
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I would like to view the output of echo
in vim, and save to a file after having a look at it. I have tried echo $PATH | vim
, but I get the following error:
Vim: Warning: Input is not from a terminal
Vim: Error reading input, exiting...
Vim: Finished.
What can I do?
vim pipe stdout
I would like to view the output of echo
in vim, and save to a file after having a look at it. I have tried echo $PATH | vim
, but I get the following error:
Vim: Warning: Input is not from a terminal
Vim: Error reading input, exiting...
Vim: Finished.
What can I do?
vim pipe stdout
vim pipe stdout
edited 22 mins ago
rrauenza
1233
1233
asked 5 hours ago
Human
286
286
askubuntu.com/questions/510890/â¦
â bertieb
1 hour ago
Possible duplicate of Read from stdin to new, named, file in vim
â bertieb
1 hour ago
add a comment |Â
askubuntu.com/questions/510890/â¦
â bertieb
1 hour ago
Possible duplicate of Read from stdin to new, named, file in vim
â bertieb
1 hour ago
askubuntu.com/questions/510890/â¦
â bertieb
1 hour ago
askubuntu.com/questions/510890/â¦
â bertieb
1 hour ago
Possible duplicate of Read from stdin to new, named, file in vim
â bertieb
1 hour ago
Possible duplicate of Read from stdin to new, named, file in vim
â bertieb
1 hour ago
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
3
down vote
You're missing the -
filename argument that instructs Vim to fill the buffer from stdin; cp. :help --
echo $PATH | vim -
Alternatively, you can use your shell's process substitution to create a temporary file descriptor and have Vim edit that "virtual" file.
vim <(echo $PATH)
If you're using Vim as a pager in place of less/more, try| vim -R -
to disable the "Save changes?" prompt when you quit.
â John Kugelman
34 mins ago
add a comment |Â
up vote
2
down vote
How can I redirect output from stout into vim?
Your question has been answered on AskUbuntu.
The simplest solution is to add -
to your command:
echo $PATH | vim -
You can use process substitution (this also works with
applications that can't read fromSTDIN
):vim <(ls -la)
Or use
vim
's function to read fromSTDIN
:ls -la | vim -
Source How do I redirect command output to vim in bash?, answer by Chaos
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
You're missing the -
filename argument that instructs Vim to fill the buffer from stdin; cp. :help --
echo $PATH | vim -
Alternatively, you can use your shell's process substitution to create a temporary file descriptor and have Vim edit that "virtual" file.
vim <(echo $PATH)
If you're using Vim as a pager in place of less/more, try| vim -R -
to disable the "Save changes?" prompt when you quit.
â John Kugelman
34 mins ago
add a comment |Â
up vote
3
down vote
You're missing the -
filename argument that instructs Vim to fill the buffer from stdin; cp. :help --
echo $PATH | vim -
Alternatively, you can use your shell's process substitution to create a temporary file descriptor and have Vim edit that "virtual" file.
vim <(echo $PATH)
If you're using Vim as a pager in place of less/more, try| vim -R -
to disable the "Save changes?" prompt when you quit.
â John Kugelman
34 mins ago
add a comment |Â
up vote
3
down vote
up vote
3
down vote
You're missing the -
filename argument that instructs Vim to fill the buffer from stdin; cp. :help --
echo $PATH | vim -
Alternatively, you can use your shell's process substitution to create a temporary file descriptor and have Vim edit that "virtual" file.
vim <(echo $PATH)
You're missing the -
filename argument that instructs Vim to fill the buffer from stdin; cp. :help --
echo $PATH | vim -
Alternatively, you can use your shell's process substitution to create a temporary file descriptor and have Vim edit that "virtual" file.
vim <(echo $PATH)
answered 5 hours ago
Ingo Karkat
17.1k22142
17.1k22142
If you're using Vim as a pager in place of less/more, try| vim -R -
to disable the "Save changes?" prompt when you quit.
â John Kugelman
34 mins ago
add a comment |Â
If you're using Vim as a pager in place of less/more, try| vim -R -
to disable the "Save changes?" prompt when you quit.
â John Kugelman
34 mins ago
If you're using Vim as a pager in place of less/more, try
| vim -R -
to disable the "Save changes?" prompt when you quit.â John Kugelman
34 mins ago
If you're using Vim as a pager in place of less/more, try
| vim -R -
to disable the "Save changes?" prompt when you quit.â John Kugelman
34 mins ago
add a comment |Â
up vote
2
down vote
How can I redirect output from stout into vim?
Your question has been answered on AskUbuntu.
The simplest solution is to add -
to your command:
echo $PATH | vim -
You can use process substitution (this also works with
applications that can't read fromSTDIN
):vim <(ls -la)
Or use
vim
's function to read fromSTDIN
:ls -la | vim -
Source How do I redirect command output to vim in bash?, answer by Chaos
add a comment |Â
up vote
2
down vote
How can I redirect output from stout into vim?
Your question has been answered on AskUbuntu.
The simplest solution is to add -
to your command:
echo $PATH | vim -
You can use process substitution (this also works with
applications that can't read fromSTDIN
):vim <(ls -la)
Or use
vim
's function to read fromSTDIN
:ls -la | vim -
Source How do I redirect command output to vim in bash?, answer by Chaos
add a comment |Â
up vote
2
down vote
up vote
2
down vote
How can I redirect output from stout into vim?
Your question has been answered on AskUbuntu.
The simplest solution is to add -
to your command:
echo $PATH | vim -
You can use process substitution (this also works with
applications that can't read fromSTDIN
):vim <(ls -la)
Or use
vim
's function to read fromSTDIN
:ls -la | vim -
Source How do I redirect command output to vim in bash?, answer by Chaos
How can I redirect output from stout into vim?
Your question has been answered on AskUbuntu.
The simplest solution is to add -
to your command:
echo $PATH | vim -
You can use process substitution (this also works with
applications that can't read fromSTDIN
):vim <(ls -la)
Or use
vim
's function to read fromSTDIN
:ls -la | vim -
Source How do I redirect command output to vim in bash?, answer by Chaos
answered 5 hours ago
DavidPostillâ¦
101k25214249
101k25214249
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1369538%2fhow-can-i-redirect-output-from-stdout-into-vim%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
askubuntu.com/questions/510890/â¦
â bertieb
1 hour ago
Possible duplicate of Read from stdin to new, named, file in vim
â bertieb
1 hour ago