How can I redirect output from stout into vim?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
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?










share|improve this question

























    up vote
    1
    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?










    share|improve this question























      up vote
      1
      down vote

      favorite









      up vote
      1
      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?










      share|improve this question













      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






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 2 hours ago









      Human

      236




      236




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          2
          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)





          share|improve this answer



























            up vote
            1
            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 from STDIN):



            vim <(ls -la)


            Or use vim's function to read from STDIN:



            ls -la | vim -



            Source How do I redirect command output to vim in bash?, answer by Chaos






            share|improve this answer




















              Your Answer







              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "3"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              convertImagesToLinks: true,
              noModals: false,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );













               

              draft saved


              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1369538%2fhow-can-i-redirect-output-from-stout-into-vim%23new-answer', 'question_page');

              );

              Post as a guest






























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              2
              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)





              share|improve this answer
























                up vote
                2
                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)





                share|improve this answer






















                  up vote
                  2
                  down vote










                  up vote
                  2
                  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)





                  share|improve this answer












                  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)






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 2 hours ago









                  Ingo Karkat

                  17k22142




                  17k22142






















                      up vote
                      1
                      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 from STDIN):



                      vim <(ls -la)


                      Or use vim's function to read from STDIN:



                      ls -la | vim -



                      Source How do I redirect command output to vim in bash?, answer by Chaos






                      share|improve this answer
























                        up vote
                        1
                        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 from STDIN):



                        vim <(ls -la)


                        Or use vim's function to read from STDIN:



                        ls -la | vim -



                        Source How do I redirect command output to vim in bash?, answer by Chaos






                        share|improve this answer






















                          up vote
                          1
                          down vote










                          up vote
                          1
                          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 from STDIN):



                          vim <(ls -la)


                          Or use vim's function to read from STDIN:



                          ls -la | vim -



                          Source How do I redirect command output to vim in bash?, answer by Chaos






                          share|improve this answer












                          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 from STDIN):



                          vim <(ls -la)


                          Or use vim's function to read from STDIN:



                          ls -la | vim -



                          Source How do I redirect command output to vim in bash?, answer by Chaos







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered 2 hours ago









                          DavidPostill♦

                          101k25214249




                          101k25214249



























                               

                              draft saved


                              draft discarded















































                               


                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1369538%2fhow-can-i-redirect-output-from-stout-into-vim%23new-answer', 'question_page');

                              );

                              Post as a guest













































































                              Comments

                              Popular posts from this blog

                              What does second last employer means? [closed]

                              List of Gilmore Girls characters

                              Confectionery